> 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.. :(

if (mysql_num_rows(mysql_query("SELECT uname FROM users WHERE uname =
'$username@$domain'")) > 0) { return("Username already exists.<BR>\n"; }

That should work for you.


Craig Vincent

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