All,
I really need help on this one... I have a class called "Profile" and I want
to store the properties of this class in the session after I give them
values shown below:
Step 1:
// set properties of class
$objProfile = new Profile('1', 'John', 'Doe') ;
// store object in session
$_SESSION["ProfileObj"] = $objProfile;
This is what my session file looks like:
!SESSION|ProfileObj|O:7:"profile":5:s:7:"staffId";s:1:"1";s:9:"firstName";s:
5:"John";s:8:"lastName";s:6:"Doe";}
Step 2:
Then I would like to access them from another page.
// Try to print the session object
print_r($_SESSION[ProfileObj]);
Results:
__PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] =>
profile [staffId] => 1 [firstName] => John [lastName] => Doe )
Is there a way to store this in the session successfully and if so how can I
do access it later?
Thanks,
-p
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php