> $query = "select count(*) from users where "
You are asking for a count() in your query. This will always give you one row returned with a count. If you really want to do this you should probably have: $query = "select count(*) as usercount from users where" Then you can do your tests based on the value of usercount. Alternately, you could do something like this: $query = "select * from user where" And then use mysql_num_rows() to see how many users you got. In this case, no matches will result in no rows returned. CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php