Re: wierd if statement problem

From: Date: Wed, 21 May 2003 07:07:52 +0000
Subject: Re: wierd if statement problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-148376@lists.php.net to get a copy of this message
On Wednesday 21 May 2003 14:53, daniel@electroteque.org wrote: > if $_SESSION['groupID'] was '1' did you want your IF statement to be > true? Yes or no? > if $_SESSION['groupID'] was '2' did you want your IF statement to > be true? Yes or no? > !==1 || !==2 so therefore false , accept to view the page I should've said this right at the beginning -- your logic is screwed! > if $_SESSION['groupID'] was '3' did you want your IF statement > to be true? Yes or no? > !==1 || !==2 so therefore true dont accept to view the page your logic is screwed! So I still don't know what you're trying to achieve. Reading your reply to Martin's post gives a clearer picture of what you want to do ... > other way round , if its not 1 or 2 i need to logout and return with an > error ... which leads me back to to my original suggestion: if (($_SESSION['groupID']!==1) AND ($_SESSION['groupID']!==2)) { logout(); } or if (!($_SESSION['groupID']===1 OR $_SESSION['groupID']===2)) { logout(); } -- 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 ------------------------------------------ /* There are bugs and then there are bugs. And then there are bugs. -- Karl Lehenbauer */

« previous php.general (#148376) next »