Well, whenever I try to run a user verify script, that asks SQL if a username is not taken, I always get this response...
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in dir/userver.inc on line 11
count unavailable
this is the code in general:
<?php
//User Name Verify
function userver($userveri)
{
$query = "SELECT 'username' FROM 'users' WHERE 'username'='$userver1'";
$sql = mysql_query($query);
$nrows = mysql_num_rows($sql) or die("count unavailable");
if($nrows != 0)
{
echo "The username you have chosen already exists!";
die();
}
else
{
return($userveri);
}
}
?>
Anyone have some ideas? I really need this function for the user database to function correctly. Help is appreciated.