this is the code I use now:
$res = mysql_query("SELECT name FROM nazcom WHERE name = $username");
if(mysql_num_rows($res)>0) { header("Location: ../error.php?id=3"); $e=1; }
'name' is the column for the username, '$username' is the varible from the sign up forum, 'error.php?id=3' is just the error page that sayd the user already exists, and '$e=1;' tells the script it ran iinto an error
but if the username is free, it returns an error saying it's not a valid mysql resource, the user still gets registered, but it won't redirect, and there's the error,
Is there a better way of checking if the username already exists?