Check if Record in Mysql does not exist
I seriously have no idea why my code is wrong, here is it
$mquery = mysql_query("SELECT * FROM users WHERE username='$_GET[user]'");
$nrows = mysql_num_rows($mquery);
if($nrows < 0) {
echo 'user doesnt exist';
}
What is wrong with it?
No comments:
Post a Comment