note 11694 deleted from ref.session by sniper
| From: | sniper@php.net | Date: | Sun, 28 Jul 2002 01:15:21 +0000 |
| Subject: | note 11694 deleted from ref.session by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-33800@lists.php.net to get a copy of this message | ||
Correction to above: Must call session_register("z") and then initialize
$HTTP_SESSION_VARS["z"] to make class persist across different pages.
//---------------------------------------------------
session_start();
if (session_is_registered("z")) $z=&$HTTP_SESSION_VARS["z"];
else {
$z=new session_variables();
session_register("z"); //--necessary
$HTTP_SESSION_VARS["z"]=&$z;
}
//---------------------------------------------------