Hello,
I just started programming PHP and MySQL after I set up a personal web server on my computer. I thought I would test it out with this simple script I wrote. The script is:
<?
$bob = "jack";
$user2pass="hjhjhjhj";
$conn = mysql_connect("localhost", "jacko115", "jf3118");
$query = "SELECT passwd FROM users where userid = '$bob'";
mysql_select_db("test", $conn);
$user2pass = mysql_query($query, $conn);
echo "Hello $bob. Your current password is $user2pass. Thank you for using me.";
mysql_close($conn);
?>
Everything seems to work apart from the fact that it returns:
Hello jack. Your current password is Resource id #2. Thank you for using me.
Instead of:
Hello jack. Your current password is yeapee. Thank you for using me.
Can anyone help me out?