note 48432 deleted from ref.session by bjori
| From: | bjori@php.net | Date: | Sat, 30 Dec 2006 16:38:20 +0000 |
| Subject: | note 48432 deleted from ref.session by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-121097@lists.php.net to get a copy of this message | ||
Note Submitter: jphansen at uga dot edu
----
If you assign a session subscript/key to the same name as a variable, the session variable will be
volatile and lost upon navigating.
For example, if passing a setting that you want in $_SESSION, don't do this:
<?
$setting = $_REQUEST['setting'];
if (!empty($setting))
$_SESSION['setting'] = $setting;
?>
Instead, rename $setting or $_SESSION['setting'].