note 23476 deleted from function.mysql-num-rows by betz
| From: | betz@php.net | Date: | Sat, 10 Aug 2002 17:18:50 +0000 |
| Subject: | note 23476 deleted from function.mysql-num-rows by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-34770@lists.php.net to get a copy of this message | ||
I'm making a login script, and I have this:
$checkReg = mysql_query("SELECT * FROM userdb WHERE username='$login_user' AND
password=PASSWORD('$login_pass')");
$num = mysql_num_rows($checkReg);
if($num == 0) {
echo "Sorry, you have some wrong information.";
} else {
login normally
}
I'm using $checkReg and $num to make sure the username and password match, but the script
always echo's out "Sorry, you have some wrong information."
Why? Everything should work perfectly.
Thanks. :)