Re: [PHP] check if user exists

2001-08-01 Thread Philip Olson
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

RE: [PHP] check if user exists

2001-08-01 Thread Matt Kaufman
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

RE: [PHP] check if user exists

2001-08-01 Thread Craig Vincent
> 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

Re: [PHP] check if user exists

2001-08-01 Thread Matt Kaufman
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

Re: [PHP] check if user exists

2001-08-01 Thread Matt Kaufman
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