RE: [PHP] wierd if statement problem

From: Date: Wed, 21 May 2003 06:47:50 +0000
Subject: RE: [PHP] wierd if statement problem
Groups: php.general 
Request: Send a blank email to php-general+get-148371@lists.php.net to get a copy of this message
shouldn't it be if (($_SESSION['groupID']===1) || ($_SESSION['groupID']===2)) then ? Martin -----Original Message----- From: daniel@electroteque.org [mailto:daniel@electroteque.org] Sent: Wednesday, May 21, 2003 4:47 PM To: php-general@lists.php.net Cc: php-general@gremlins.biz Subject: Re: [PHP] wierd if statement problem sorry forget those examples groupID should be either 1 or 2 and not 3, check the other examples i've sent if they work i'm stumped :\ > On Wednesday 21 May 2003 14:06, daniel@electroteque.org wrote: >> this is wierd i have not experienced this before , but i am doing >> groupId checking for my authentication system , say i'm logged is as >> admin , but also need to check for super user access >> >> if (($_SESSION['groupID']!==1) || ($_SESSION['groupID']!==2)) i've >> done this before but for some reason its not working now ?? > > The above statement looks perfectly OK. > > - What does $_SESSION['groupID'] contain? > - What did you expect to happen? > - What actually happened? > > My guess is that you want a logical AND rather than OR. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > ------------------------------------------ > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > ------------------------------------------ > /* > The verdict of a jury is the a priori opinion of that juror who smokes > the worst cigars. > -- H. L. Mencken > */ > > > -- > 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

« previous php.general (#148371) next »