Re: wierd if statement problem
| From: | Jason Wong | Date: | Wed, 21 May 2003 06:50:36 +0000 |
| Subject: | Re: wierd if statement problem | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148373@lists.php.net to get a copy of this message | ||
On Wednesday 21 May 2003 14:46, daniel@electroteque.org wrote:
> 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.
Again, WHAT DID YOU EXPECT YOUR CODE TO DO?
if $_SESSION['groupID'] was '1' did you want your IF statement to be true?
if $_SESSION['groupID'] was '2' did you want your IF statement to be true?
if $_SESSION['groupID'] was '3' did you want your IF statement to be true?
--
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
------------------------------------------
/*
If we won't stand together, we don't stand a chance.
*/