Re: $_SESSIONS and printing off..

From: Date: Tue, 18 Feb 2003 12:42:13 +0000
Subject: Re: $_SESSIONS and printing off..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-135989@lists.php.net to get a copy of this message
At 13:33 18.02.2003, Frank Keessen said: --------------------[snip]-------------------- >This is working fine. But i've set $_SESSION['level'] to value 2 (that's >done in the php file that calls this one). Now i want the above code to >check for the level and if is not equal to two than go to the else (back to >login.htm) statement.. --------------------[snip]-------------------- <?php session_start(); if (isset($_SESSION['username']) && !empty($_SESSION['username']) && $_SESSION['level'] == 2){ echo 'Welcome '.$_SESSION['username'].', you are still logged in.'; echo $_SESSION['woonplaats']; } else{ header ( "Location: login.htm" ); } ?> -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#135989) next »