Select all the users (I did it in a while statement..although I'm sure there
is a better way) and inside it do something like
// html form
// if form is submitted
// get all useres from db
// start while
if($htmlformuser == $usersindb) {
echo "Username exists";
}
// end while
// end if form is submitted
Matt Kaufman
----- Original Message -----
From: "Ker Ruben Ramos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 01, 2001 11:44 AM
Subject: [PHP] check if user exists
> 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]
>
>
>