note 11694 added to Session handling functions
| From: | php-general at lists dot php dot net | Date: | Fri, 02 Mar 2001 18:52:54 +0000 |
| Subject: | note 11694 added to Session handling functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-11782@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;
}
//---------------------------------------------------
http://www.php.net/manual/en/ref.session.php