|
Posted by Jerry Stuckle on 08/08/06 02:22
nephish wrote:
> Ok, well what i have been doing is creating session variables for
> everything possible that relates to what one may call an object (not in
> the code, but at the site)
> like $name = $_SESSION['name'];
> $email = $_SESSION['email'];
> $phone = yadda, yadda, yadda
>
> so, i suppose this is still the easier way to pull this off.
> thanks for all the info, i am trying to learn as much as possible
> because i want to redesign everything in the fall. i started learning
> php about a year ago, and a whole lot of stuff i did last Fall, i would
> do differently this Fall.
> So i want to make it as streamlined as possible.
>
> thanks for all your help
>
> shawn
>
>
How I typically do it (since I have my data in a database) is to store
the primary key to the entry in my $_SESSION object. Then I fetch
whatever I need from the database when I need it.
I find this to be much cleaner code. It also fetches current
information in the (admittedly unlikely) event the data is changed while
you're passing it around.
P.S. Please don't top post. This newsgroup uses bottom (or inline)
posting as the standard.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|