Re: SESSION variables: How much is too much?
| From: | D.M.Jackson | Date: | Wed, 08 Jul 2009 23:30:42 +0000 |
| Subject: | Re: SESSION variables: How much is too much? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295053@lists.php.net to get a copy of this message | ||
Thanks guys. I was just wondering if it was common practice to pass all
those variables in the SESSION object or if I was following a bad example
because it was the first time that I had seen so many variables passed this
way. If this is the typical way of handling this in php then I don't have a
problem with it, I just wanted to make sure that I wasn't getting off to a
bad start and picking up bad habits while learning php.
Thanks,
Mark
""D.M.Jackson"" <cnoevil@catt.com> wrote in message
news:90.23.10517.08E145A4@pb1.pair.com...
> Hi,
>
> I'm trying to learn php mostly by reading the docs and pulling through
> other peoples projects for reference examples. One particular application
> I'm looking at has a ton of variables being handled through the SESSION
> global variable, probably about 25 or so variables. That just seems like
> alot.
>
> Since I'm pretty new to php I was wondering if this was typical and
> acceptable or if there was another best practice for maintaining large
> amounts of information throughout a session, like maybe persisting a
> temporary object in the database and passing a connection...or something.
> Or is just passing around a pile of variables directly in the SESSION
> object better?
>
> Thanks,
> Mark
>