Re: [PHP4BETA] session_register / form
| From: | Chris Shenton | Date: | Mon, 20 Mar 2000 15:29:24 +0000 |
| Subject: | Re: [PHP4BETA] session_register / form | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12434@lists.php.net to get a copy of this message | ||
On Sun, 19 Mar 2000 15:29:54 +0200, Ben-Nes Michael <miki@canaan.co.il> said:
Ben-Nes> when session var is registered and value is passed by a form,
Ben-Nes> the form var is not overriding the registered var.
You actually want it this way. You can, for example, authenticate a
user and set a $userid as a session variable, and then it cannot be
overridden by rogue form or URL variables.
Ben-Nes> Will it change in the near future ? any way to go around
Ben-Nes> this problem ?
If you really want to set a session var to something based on a form
(or URL variable) then set the name of the form/URL var to something
different, then assign it to the session var, e.g.,
$sess_var = $form_var;