note 44082 rejected from function.session-register by tomsommer
| From: | tomsommer@php.net | Date: | Wed, 14 Jul 2004 19:26:15 +0000 |
| Subject: | note 44082 rejected from function.session-register by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73235@lists.php.net to get a copy of this message | ||
Note Submitter: php@w2wave.com
----
Looking to add objects to a session and then retrieve them but failing miserable.
Am doing the following in first file:
session_start();
$_SESSION['user'] = $userModel;
header("Location: MainView.php");
And following in second file:
$user = &$_SESSION['user'];
echo $user->getUserContact();
But get the following error:
Fatal error: Call to a member function on a non-object in
/usr/local/home/httpd/vhtdocs/secure.w2wave.com/v2/MainView.php on line 7
Any help appreciated.