$check = mysql_query("SELECT username FROM users WHERE username = '$user'") or die(mysql_error());
$true = mysql_num_rows($check) or die(mysql_error());
if($true == 0) {
echo "<center><font color=red>Not a valid user.</font></center>";
} else {
echo "good.";
}
$user is gotten from the $_GET variable.
When the query is ran, but there is no username in the database equal to $user, it makes the page blank where mysql_num_rows is ran. I've had this problem a few times, and I've worked around it, but I can't seem to here. I'm just wondering what I can do to make it work.
