|
|
| |
1. Troubleshooting! |
|
Reply |
|
|
 Simon | 2007-04-04 13:31:25 |
I'm trying to pass an object using the Object Session Saver class and I can't retrieve the information on a new page. I'm not too sure but I don't think this Session Saver is working correctly.
--first page
$objectsForSaving = array("HeadAdmin");
SessionSaver::addObjects($objectsForSaving);
SessionSaver::restoreObjects();
$head = new HeadAdmin(1, "goCampus");
HeadAdmin::$_firstName = "Joshua";
SessionSaver::saveObjects();
--second page - POSTED from the first page
$objectsForSaving = array("HeadAdmin");
SessionSaver::addObjects($objectsForSaving);
$head = new HeadAdmin(1, "goCampus");
$head = SessionSaver::restoreObjects();
echo "Your Name Is: ". $head->_firstName;
--the output
Your Name Is: |
| |
2. Re: Troubleshooting! |
|
Reply |
|
|
 Vit Ek | 2007-04-04 13:52:50 - In reply to message 1 from Simon |
If this is all you have in those files, than you must add a session initialization routine, something like:
if (empty($_SESSION)) {
session_start();
} |
|