again.. jadi penganggur. mula2 rasa macam takpe kot kalau menganggur 1 bulan sebelum dapat kerja baru. tapi ini dah almost sebulan tapi still tak dapat any job.
mula2 macam tak pe kot . sebab takde lah perlukan sgt duet sekarang ni. I can deal being moneyles..
pastu mula lah tgk kawan2 kat insta or twitter yang gi melancong sana sini, shopping sana sini. tak de lah cemburu tapi rasa macam what if i'd job right now mesti I can do those thing gak.
but
the worst nightmare is when parents or sibs kau kat rumah pandang kau mcm loser tak bekerja. PARASIT?
maybe it was just me..
but dude i had a degree and IT MEANS NOTHING.. USELESS.
Aku yang buat die jadi useless.
SORRY BLAME IT ON ME..
Feast of Emotions
when i feel emotional.. i write
Monday, August 22, 2016
Tuesday, November 24, 2015
LYRICS #My1stAttempt
Title: On My Own
Seeing myself in the mirror
But I don't see me..
But I don't see me..
Cleaning myself desperately
Singing KPOP song of Empty
It does feel empty
Maybe it just me being weird about the world
He doesn't need me
Why do I care
'Hey what would you do to make this a better place'
I don't know
I don't care
Let me be alone
Do nothing
(2x)
On my own...
On my own..
Walking on a street in red converse
Feeling insecure at people's gaze
Or was it just me..
Thinking to enter a store
Meeting a stranger at the door
He looks too friendly
Feeling insecure at people's gaze
Or was it just me..
Thinking to enter a store
Meeting a stranger at the door
He looks too friendly
Even when this feels falling apart
Even my heart can't take this anymore
Why do I care
'Hey stranger let's be friend, I have money to treat you well'
I don't want you
I don't care
Let me be alone
Do nothing
(2x)
On my own...
On my own..
Saturday, January 10, 2015
10 January 2015
Pernah ke kadang2 kita rasa macam kita nih lagi hebat dari orang laen? tapi kadang2 rasa mcm kite nih perasan diri hebat. tapi bile dah rasa hebat rasa mcm kene control nanti orang kata kita menunjuk nunjuk?
Friday, January 2, 2015
2 Jan 2015 - THORIN MONTH
today's paper went well. the questions were pretty easy.... but i bet the marking scheme will be tougher than midterm.. fingercrossed.. i pass
1 JAN 2015 - THORIN MONTH
Nothing much. just staying at home doing my final revision before exam on the next day. >< Happy New Year i guess??..
Sunday, December 14, 2014
HOW TO DISPLAY IMAGE ON PHP PAGE
After storing the image in database, now its time to display it. so how do we do it?
The codes:
<!DOCTYPE HTML>
<html>
<body>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
ID:<br><input type="varchar" name="id">
<input type="submit" name="submit" value="Search">
</form>
<?php
$db_host = "localhost";
$db_username = "root";
$db_pass = "usbw";
$db_name = "image";
@mysql_connect ("$db_host", "$db_username", "$db_pass") or die ("Could not connect to MySQL");
@mysql_select_db("$db_name") or die ("No database");
if(isset($_POST['submit'])) {
//id no sent from form
$id=$_POST['id'];
// To protect MySQL injection
$id= stripslashes($id);
$id= mysql_real_escape_string($id);
$data=mysql_query("SELECT * FROM img WHERE id='$id'");
if ($row = mysql_fetch_array($data)) {
$photo = $row['path'];
echo "<style='text-align:center'><center><img src=$photo alt=Profile Photo height=300px
width=300px></center>"."</br>";
}
}
?>
</body>
</html>
Lets test the code!
The codes:
<!DOCTYPE HTML>
<html>
<body>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
ID:<br><input type="varchar" name="id">
<input type="submit" name="submit" value="Search">
</form>
<?php
$db_host = "localhost";
$db_username = "root";
$db_pass = "usbw";
$db_name = "image";
@mysql_connect ("$db_host", "$db_username", "$db_pass") or die ("Could not connect to MySQL");
@mysql_select_db("$db_name") or die ("No database");
if(isset($_POST['submit'])) {
//id no sent from form
$id=$_POST['id'];
// To protect MySQL injection
$id= stripslashes($id);
$id= mysql_real_escape_string($id);
$data=mysql_query("SELECT * FROM img WHERE id='$id'");
if ($row = mysql_fetch_array($data)) {
$photo = $row['path'];
echo "<style='text-align:center'><center><img src=$photo alt=Profile Photo height=300px
width=300px></center>"."</br>";
}
}
?>
</body>
</html>
Lets test the code!
We are done. yea! easy peasy right... have a try and good luck! ><
HOW TO STORE IMAGE IN MYSQL DATABASE FROM PHP
My previous post of the same topic was rather too easy. But how do we do it using some programming say PHP?. so lets start...
<!DOCTYPE HTML>
<?php
$db_host = "localhost";
$db_username = "root";
$db_pass = "usbw";
$db_name = "image";
?>
<html>
<head>
</head>
<body>
<form> name="Image" enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<center><fieldSet style="width:50%">
<p><input type="file" name="Photo" size="2000000"
accept="image/gif, image/jpeg, image/x-ms-bmp, image/x-png" size="26"></p>
<input type="submit" name="submit" value="Upload image" size="50">
</fieldSet></center>
</form>
$uploadDir='images/'; //image upload folder
if(isset($_POST['submit'])) {
$fileName = $_FILES['Photo']['name'];
$tmpName = $_FILES['Photo']['tmp_name'];
$fileSize = $_FILES['Photo']['size'];
$fileType = $_FILES['Photo']['type'];
$filePath = $uploadDir . $fileName;
$result = move_uploaded_file($tmpName, $filePath);
if (!$result) {
echo "Error uploading file";
exit;
}
if(!get_magic_quotes_gpc()) {
$fileName = addslashes($fileName);
$filePath = addslashes($filePath);
}
@mysql_connect ("$db_host", "$db_username", "$db_pass") or die ("Could not connect to
MySQL");
@mysql_select_db("$db_name") or die ("No database");
@mysql_query(" INSERT INTO `img`(`path`) VALUES ('$filePath')");
echo '<script>alert("Image is successfully uploaded");</script>';
}
else {
echo "Complete the form before submitting";
}
?>
</body>
</html>
This is how it looks like on PHP page
<!DOCTYPE HTML>
<?php
$db_host = "localhost";
$db_username = "root";
$db_pass = "usbw";
$db_name = "image";
?>
<html>
<head>
</head>
<body>
<form> name="Image" enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<center><fieldSet style="width:50%">
<p><input type="file" name="Photo" size="2000000"
accept="image/gif, image/jpeg, image/x-ms-bmp, image/x-png" size="26"></p>
<input type="submit" name="submit" value="Upload image" size="50">
</fieldSet></center>
</form>
$uploadDir='images/'; //image upload folder
if(isset($_POST['submit'])) {
$fileName = $_FILES['Photo']['name'];
$tmpName = $_FILES['Photo']['tmp_name'];
$fileSize = $_FILES['Photo']['size'];
$fileType = $_FILES['Photo']['type'];
$filePath = $uploadDir . $fileName;
$result = move_uploaded_file($tmpName, $filePath);
if (!$result) {
echo "Error uploading file";
exit;
}
if(!get_magic_quotes_gpc()) {
$fileName = addslashes($fileName);
$filePath = addslashes($filePath);
}
@mysql_connect ("$db_host", "$db_username", "$db_pass") or die ("Could not connect to
MySQL");
@mysql_select_db("$db_name") or die ("No database");
@mysql_query(" INSERT INTO `img`(`path`) VALUES ('$filePath')");
echo '<script>alert("Image is successfully uploaded");</script>';
}
else {
echo "Complete the form before submitting";
}
?>
</body>
</html>
This is how it looks like on PHP page
Testing our codes:
1) upload new image [canary.jpg] :
2) recheck your database to see if the image is successfully uploaded or not. (im my case, YEA! it works)
SO WE ONLY FINISH THE FIRST STEP. LETS HIT THE NEXT ONE
Subscribe to:
Posts (Atom)