Why would this php not work but would work this way? -


if ($sess_uid == $wallid) { // } else { run action } 

works but

if (!$sess_uid == $wallid) { run action } 

wont work. why this? want code fire off if both ids don't match.

this:

if (!$sess_uid == $wallid) {     run action } 

is equivalent this:

if ( (!$sess_uid) == ($wallid)) {     run action } 

while want:

if (!($sess_uid == $wallid)) {     run action } 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -