$result = mysql_query("SELECT uname FROM users WHERE
uname=\'$username@$domain\'");
$numrows = mysql_num_rows($result);

if ($numrows == '1') {
  echo "User already exists";
} else {
  echo "User don't exist";
}

Best Regards
Fredrik A. Takle
Bergen, Norway

"Ker Ruben Ramos" <[EMAIL PROTECTED]> wrote in message
009f01c11aba$1110d6c0$323039ca@weblinq1">news:009f01c11aba$1110d6c0$323039ca@weblinq1...
> how do i check if user exist?
> I tried...
>     $result = mysql_query("SELECT count(uname) FROM users WHERE
> uname=\'$username@$domain\'");
>     if(isSet($result))
>         return("Username already exists.<br>\n");
> but still wont work.. :(
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to