note 11548 deleted from ref.session by sniper

From: Date: Sun, 28 Jul 2002 01:15:48 +0000
Subject: note 11548 deleted from ref.session by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-33801@lists.php.net to get a copy of this message
-->session objects part II: I got this to work, if you are also having problems with sessions with register_globals turned off and none of the other suggestions work, you may as well give it a try: class session_variables{var $count=0;} session_start(); if (isset($HTTP_SESSION_VARS["z"])) $z=&$HTTP_SESSION_VARS["z"]; else { $z=new session_variables(); $HTTP_SESSION_VARS["z"]=&$z; } print $z->count++; -- Editor's note: Original code uses session_is_registered(). DO NOT USE session_register(), session_is_registered() and session_unregister(), if you are using $HTTP_SESSION_VARS/$_SESSION.

« previous php.notes (#33801) next »