RE: [PHP] Session Variables
| From: | Sascha Schumann | Date: | Wed, 25 Jul 2001 21:10:26 +0000 |
| Subject: | RE: [PHP] Session Variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-59623@lists.php.net to get a copy of this message | ||
On Wed, 25 Jul 2001, Johnson, Kirk wrote:
> > Is there anyway to prevent session variables from being
> > overwritten by a get string?
>
> PHP will do this automatically *if* you initialize your session variables to
> *anything* as soon as you register them. For example,
>
> session_register("sess_auth");
> $sess_auth = "";
Note that session_register() will implicitly commence the
session, and thus will automatically instantiate all session
variables. Hence, the above two lines need to be reversed,
otherwise you might overwrite the session variable.
- Sascha Experience IRCG
http://schumann.cx/ http://schumann.cx/ircg