RE: [PHP] registering a session variable from a select * query.

From: Date: Wed, 06 Mar 2002 17:52:45 +0000
Subject: RE: [PHP] registering a session variable from a select * query.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-87496@lists.php.net to get a copy of this message
What exactly are you trying to accomplish here? In my script I have a login form. On the valdation script all my session vars are registered. I run a script to check to see if the username and password are auth. If they are I then run some scripts to set the values of the various session variables. If not auth then I unregister all the variables and show the login form again. I also have a similiar thing in my page scripts of looking for a higher value in on of the session variables to grant a user more access to the site. So in this session_register('some_variable');
if $auth_level from the select I have just ran =A
        $some_variable = 'authorized';
else
        echo "you are not allowed in this area get out...."
Then on all my pages I would check to see if $some_variable is set to authorized if not then get out. Phillip

« previous php.general (#87496) next »