Re: Session Variables in a Class

From: Date: Tue, 09 Sep 2003 12:39:52 +0000
Subject: Re: Session Variables in a Class
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-162055@lists.php.net to get a copy of this message
From: "micro brew" <microbrewclub@yahoo.com> > I've been experimenting with sessions. I can make > them work just fine in a normal PHP page. But when I > create a class and try to define a session variable > within a method in the class it won't work. I've > tried setting the session variable directly > ($_SESSION['name']='somevalue') but that didn't work. > The normal way of setting it - > session_start(); > session_register('name'); > $name='somevalue'; > > - didn't work either (within the class). "didn't work" isn't very helpful to us. How useful would it be for me to just answer you with "it worked" for me. Show us some code examples (short ones) as to how this doesn't work, please. ---John Holmes...

« previous php.general (#162055) next »