Re: Objects in Session variables ?
| From: | Alain Fontaine | Date: | Thu, 04 Jan 2001 22:19:45 +0000 |
| Subject: | Re: Objects in Session variables ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32720@lists.php.net to get a copy of this message | ||
Hi,
So, if I instantiate the class on the other pages, I'd need a method that
would "import" the correct values from the session variable again, right?
Something like User->getValues().....
"Cynic" <cynic@mail.cz> a écrit dans le message news:
5.0.0.25.2.20010104224648.02d35188@mail.cz...
> It's supposed to work (if you instantiate the class in the
> other page, you'll have the methods too), but there've been
> bugs. However, 4.0.4 should be ok.
>
>
> At 22:38 4.1. 2001, Alain Fontaine wrote the following:
> --------------------------------------------------------------
> >Hello,
> >
> >In my current PHP4 project, I have a "User" class, amongst a couple of
other
> >classes. What I'd like to is: when the user logs on to the site, store
his
> >personal "User" object in a session variable so that I can easily access
all
> >of his information from any page without having to requery the database
to
> >get that information. Is this possible, e.g. can one simply
> >session_register() an instance of a PHP class, even if I'll lose the
methods
> >and only keep the member variables ?
> >
> >Thanks !
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> >For additional commands, e-mail: php-general-help@lists.php.net
> >To contact the list administrators, e-mail: php-list-admin@lists.php.net
> ------end of quote------
>
>
>
> ____________________________________________________________
> Cynic:
>
> A member of a group of ancient Greek philosophers who taught
> that virtue constitutes happiness and that self control is
> the essential part of virtue.
>
> cynic@mail.cz
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>