You've got too many closing braces...

if ($temp == $temp2) {
$ierror = "Loginnamnet är redan upptaget!<br>" . $ierror; }   <--- Here's
one
}                                                             <--- Here's
the other
} else { print "error"; }                                     <--- And a
third one

You only need one of them...
HTH
Martin

-----Original Message-----
From: Pafo [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 3:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php string match problem


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



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

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

Reply via email to