i am working on a signup script and i am stuck, i cant figure out how to check the database to see if the name already exists, this is hwat i have so far:
$checkuser = "SELECT username FROM users WHERE username = '$_POST[username]'";
if ( mysql_num_rows($checkuser, $conn) >= 1 ) {
echo "The name already exists. <a href='signup.html'>Back</a>";
}
btw the tabe is called users and the column is called username, when i use the aboce i get an error:
Warning: Wrong parameter count for mysql_num_rows() in c:\phpdev\www\login\signup.php on line 33
thx