You have to check for a db result with either $count = mysql_num_rows($q_updateresult) 
or 
if ($row = mysql_fetch_array($q_updateresult)).

mysql_query returns a 1 or 0 to indicate if the query was sucessful.  One might 
typically query a db before inserting a record to make sure it's not there first. If 
it's not there, there wouldn't be a result, but the query was okay.

> From: FredrikAT [mailto:[EMAIL PROTECTED]]

> $na_pw is the active password...
> ..if pw is blank or wrong i want to output a error message...
> ...iknow that I could do if (empty($na_pw) and $na_pw <> 
> $pw), but then I
> would have to send another query to MySQL..
> 
> I thought that q_updateresult would say (when i echo) 0 when 
> password is bad, but it echos 1.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to