RE: [PHP] check if user exists
| From: | Matt Kaufman | Date: | Wed, 01 Aug 2001 21:40:22 +0000 |
| Subject: | RE: [PHP] check if user exists | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-60741@lists.php.net to get a copy of this message | ||
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" <kramz@iligan.weblinq.com>
To: <php-general@lists.php.net>
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: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>