Re: objects stored in sessions

From: Date: Sun, 06 Apr 2008 15:14:45 +0000
Subject: Re: objects stored in sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-272589@lists.php.net to get a copy of this message
So, if I create a user object, set the properties of said user object and store that object in the user session will that object be available throughout the application from the session?
Yes. Just remember to include the class definition before you start the session on subsequent pages, otherwise you will encounter problems. Or alternatively use __autoload() to allow the class code to be loaded when you start the session. -- Richard Heyes Employ me: http://www.phpguru.org/cv

« previous php.general (#272589) next »