I've searched through the forum for help but can't really solve it that way. What's the problem with this username check function :
$usercheck = mysql_query("SELECT username from users WHERE username=$username");
if ($usercheck){
header( "Location: http://www.XXX.com/register.php?error=exists" );
}
Username is a text and I do connect to the database before this. Any help?