php string match problem

From: Date: Mon, 19 Aug 2002 05:21:23 +0000
Subject: php string match problem
Groups: php.general 
Request: Send a blank email to php-general+get-113176@lists.php.net to get a copy of this message
heh,, is it just me or can anyone see whats wrong with this code... $query = "SELECT * FROM logininfo WHERE loginname = '$LOGINNAME'"; if ($result = mysql_query($query)){ while ($row = mysql_fetch_row($result)){ $temp = $row[8]; $temp2 = $LOGINNAME; if ($temp == $temp2) { <-------------- this dosent work $ierror = "Loginnamnet är redan upptaget!<br>" . $ierror; } } } else { print "error"; } mysql_close($db); i have tried: if ($row[8] == $LOGINNAME) { dosent work either, and when i write: while ($row = mysql_fetch_row($result)){ print $row[8] . "-" . $LOGINNAME; it shows the exact same information anyone got any idea? patrick

« previous php.general (#113176) next »