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/usin
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...
> $
> 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.\n");
> but still wont work.. :(
if (mysql_num_rows(mysql_query("SELECT uname FROM use
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...
> $
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...
> $
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.\n");
but still wont work.. :(
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
6 matches
Mail list logo