HTTP_SESSION

From: Date: Thu, 26 Jun 2003 22:29:35 +0000
Subject: HTTP_SESSION
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6268@lists.php.net to get a copy of this message
I cannot figure out how to pull variables out of an HTTP_SESSION object. i can set a variable like this: $session = new HTTP_Session; $session->setContainer('DB', array('dsn' => 'mysql://user:pass@localhost/storage_cabinet', 'table' => 'sessiondata')); $session->useCookies(true); $session->start('SessionID', uniqid('MyID')); $session->register('user'); $session->set('user',"$a->username"); but when i try to pull the username out of the session, (which is in the database) like this: $user_ = $session->get('user'); I get it to print the $user_ variable only once, on the same hit that it is set. In subsequent requests, the variable is gone, but in the database. What is the proper way to set and get variables from HTTP_SESSION? Thanks in advance, David Dahl

« previous php.pear.general (#6268) next »