Re: wierd if statement problem
| From: | Wendell Brown | Date: | Wed, 21 May 2003 15:07:14 +0000 |
| Subject: | Re: wierd if statement problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148422@lists.php.net to get a copy of this message | ||
On Wed, 21 May 2003 16:06:30 +1000 (EST), daniel@electroteque.org
wrote:
>if (($_SESSION['groupID']!==1) || ($_SESSION['groupID']!==2)) i've done
I think you will see the flaw in the logic if you look at a simplified
version of the if. Try using 1, 2 and 3 instead
$_SESSION['groupID'].....
if( (1!=1) || (1!=2) )
The possible solutions are:
Using 1 -- ( False || True ) = TRUE
Using 2 -- ( True || False ) = TRUE
Using 3 -- ( True || True ) = TRUE
As someone else said... this is classic. :)