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
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
> 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
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
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
5 matches
Mail list logo