[snip]
please note this will only catch invalid queries. To catch the event
of the query being perfectly fine, but nothing coming back, just check
the values of num_rows or affected_rows (depending on the query).

[/snip]

um....?? this way doesnt work for some strange reason... testing
affected_rows returns always with 0 so: if(mysql_affected_rows()==0){...}
will always get ran even if the query itself returned an invalid user
login...
num_of_rows will always return true and never false i guess because when
$result (the query itself) is "invalid" or returns the fact that the user
typed a wrong username and or password the db server returns NULL, false or
rightfully 0. thus the error:
num_of_rows() is not a valid resource type in:......login.php error

so as far as i know i have to test the literall existance of the $result
resource being true (a real login) or false (the login failed)...

at this point i cant test for $_SESSION['username'] because it hasnt been
registered yet...

anyhow..off my soap box

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

Reply via email to