have you tried printing them out with surrounding characters, like

echo 'row8=(',$row[8],') LOGINNAME=(',$LOGINNAME,')';

to see if there are leading or trailing spaces?

On Mon, 19 Aug 2002, Pafo wrote:

> 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