Re: PHP- accessing session var
| From: | Michael A Smith | Date: | Wed, 13 Aug 2003 22:38:09 +0000 |
| Subject: | Re: PHP- accessing session var | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159500@lists.php.net to get a copy of this message | ||
That's what he was doing and he gave us the output. You can have an object stored in $_SESSION as long as the class and object were defined _before_ you stared the session.
You would therefore access it like this:
$some_var = $_SESSION['object_name']->varname;
Cheers!
-Michael
Chris Shiflett wrote:
--- Mignon Hunter <hunter@tic.toshiba.com> wrote:When I print_r my session vars> part of what get is:Do this: print_r($_SESSION); Show us what that outputs. Your output seemed to infer that you are doing something else when you "print_r your session vars", as _SESSION was listed as a key within another array. I'm not sure what you're doing there. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/