note 11515 deleted from function.session-start by jimw
| From: | jimw@php.net | Date: | Fri, 07 Dec 2001 20:25:37 +0000 |
| Subject: | note 11515 deleted from function.session-start by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-21900@lists.php.net to get a copy of this message | ||
You can also put all of your session variables in a container object and access them that way. That
will solve the security problem of ppl adding ?admin=1 to the query string. Since you always will
do
if ($mysession_ojbect->admin == 1)...
You also get the added benefit of not having to call session_register for each new var you want to
add. Just add the var to the object on the fly and whamo, its saved.
And reading your php scripts makes more sense. You can tell what is a session var by reading the
code
$mysession_object->foo = "bar";
vs.
$foo = "bar";
can't really tell if $foo is a session variable by looking at it.