problem: if / == / !=

From: Date: Thu, 30 Nov 2000 00:15:16 +0000
Subject: problem: if / == / !=
Groups: php.general 
Request: Send a blank email to php-general+get-27902@lists.php.net to get a copy of this message
Hi, Can anyone say why this isn't working? I've tried it out with === as well. $row[name] is the field 'name' in a db table and the following is a test used on every table row that is looped through. $write is already set. I want to print a cell with 'edit' inside for every instance where $sess_usr[name] - a session variable - is the same as 'name' (itself originally set using $sess_usr[name]) if (($write) && ($sess_usr[name] == $row[name])) { echo "<td><a href=\"et.php?&fid=$fid&rid=$row[id]&table=$table&hrefedit=true&write=$write&content=$contentvf edit</a></td>"; } elseif (($write) && ($sess_usr[name] != $row[name])) { echo "<td>&nbsp</td>"; } PS Don't mind the long url (I know it must be an imperfect solution). Thankyou, Magnus

« previous php.general (#27902) next »