Andy B wrote:

mysql_query("select * from rnjresort.users where username='$username' and 
pwd=md5($password)");
//see if user exists..
if(mysql_affected_rows()==0){

You're not assigning the query result to a variable.


$result = mysql_query(" ... ");

Then, mysql_affected_rows() is not going to return anything for a SELECT query. It's only for UPDATE/INSERT/DELETE queries. You need to use mysql_num_rows().

if(mysql_num_rows($result)==0){

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to