Re: check if user exists

From: Date: Wed, 01 Aug 2001 21:39:40 +0000
Subject: Re: check if user exists
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-60738@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 > > >

« previous php.general (#60738) next »