note 14551 deleted from function.session-unregister by jimw
| From: | jimw@php.net | Date: | Tue, 18 Dec 2001 19:28:58 +0000 |
| Subject: | note 14551 deleted from function.session-unregister by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23146@lists.php.net to get a copy of this message | ||
<p>you __CANNOT__ change a value stored in a session variable via a GET variable with the same
name.</p>
example:
html query: get index.php?cat=yellow
session data: cat='red'
<p>you cannot change the value of 'cat' because session_register before register the
new value checks if that values comes from HTTP_VARS array.
if so, it silenly ignores your change.
the only way is to do something like:
html query: get index.php?fake_cat=yellow
and in the index.php
----index.php----
session_unregister('cat');
$cat=$fake_cat;
session_register('cat');
hope that helps.