Session Variables in a Class

From: Date: Tue, 09 Sep 2003 08:19:38 +0000
Subject: Session Variables in a Class
Groups: php.general 
Request: Send a blank email to php-general+get-162044@lists.php.net to get a copy of this message
Hi everyone, 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). Am I just missing something obvious? Any suggestions? TIA. Mike __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com

« previous php.general (#162044) next »