mysql_trouble (check fast!)

From: Date: Tue, 08 May 2001 20:11:52 +0000
Subject: mysql_trouble (check fast!)
Groups: php.general 
Request: Send a blank email to php-general+get-51972@lists.php.net to get a copy of this message
$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. Any tips? CODE: $q_updatequery = "UPDATE brukerinfo SET navn=\"$ny_navn\", tlf=\"$ny_tlf\", pw=PASSWORD('$ny_pw') WHERE brukerID=\"$id\" and pw=PASSWORD('$na_pw')\n"; $q_updateresult = mysql_db_query ($db, $q_updatequery); --------------------------------- Fredrik A. Takle fredrik@takle.net

« previous php.general (#51972) next »