Re: wierd if statement problem

From: Date: Wed, 21 May 2003 06:45:19 +0000
Subject: Re: wierd if statement problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-148369@lists.php.net to get a copy of this message
this one takes the cake absolutely classic $g = "1" ; if ($g!=="1" || $g!=="2") die("no"); > Hi > > > deo> this is wierd i have not experienced this before , but i am doing > groupId deo> checking for my authentication system , say i'm logged is > as admin , but deo> also need to check for super user access > > deo> if (($_SESSION['groupID']!==1) || ($_SESSION['groupID']!==2)) > deo> i've > done deo> this before but for some reason its not working now ?? > > Why are you using !== ? Try != > Maybe $_SESSION['groupID'] equals '1' but not 1 > > > > > > > > > -- > Regards > > Anton > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#148369) next »