Trouble with mysql_result!
Posted: Sat May 09, 2009 4:17 pm
Okay, I've been working on this for the last 3 hours.
I don't know what I'm doing wrong, I'm getting this error when the script is run:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/lasegon/public_html/youscrape/authlib.php on line 64
Here's my sql query along with the code:
$pword refers to a $_POST variable. $uname refers to a post variable.
If anyone could tell me whats wrong, thank you SO much.
I don't know what I'm doing wrong, I'm getting this error when the script is run:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/lasegon/public_html/youscrape/authlib.php on line 64
Here's my sql query along with the code:
Code: Select all
$res = mysql_query("SELECT password FROM users WHERE username = '".$uname."'");
//$resEncrypted = crypt($res,'SHA_512');
$passEncrypted = crypt($pword, 'whirlpool');
$row = mysql_result($res, 0);If anyone could tell me whats wrong, thank you SO much.