Re: check if user exists
| From: | Philip Olson | Date: | Wed, 01 Aug 2001 19:20:29 +0000 |
| Subject: | Re: check if user exists | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-60756@lists.php.net to get a copy of this message | ||
See what this does within your code :
$count = mysql_result($result,0);
Should give you your count (number of users in db). Btw, don't escape
single quotes in double quotes. In otherwords, the following is fine :
$string = "I'm a nice string";
See :
http://zend.com/zend/tut/using-strings.php
Regards,
Philip
On Thu, 2 Aug 2001, Ker Ruben Ramos wrote:
> 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
>