Re: Help with Sessions - Should be easy =]

From: Date: Fri, 21 Dec 2001 01:39:17 +0000
Subject: Re: Help with Sessions - Should be easy =]
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-78380@lists.php.net to get a copy of this message
At 01:53 AM 12/21/2001 +1100, Tomasz Jachimczak wrote:
I am retreiving user information from a database after verification, and would like to place certain feilds into a session variable for easy access/retreival. I can get the information out of the database, but cannot place it into any sort of variable that will store on the page.
Why would you want to? If the information you need is available in your database, why not query the database for it on each page you need to reference this data? It seems kind of strange to me to take data you have in one server-side information store (the db) and move it into another (a server-side session cookie)...the overhead to get the info out should be the same both ways. Now that is assuming that you aren't already using session variables for something else. If you are then I could understand a little better. Either way, you'll need to provide a few more details about what you've tried and what your experiences have been before anyone will be able to help you... You haven't really described your problem beyond saying that you cannot get it to work. Have you registered your variable with session_register()? Have you started the session with session_start() on the pages you need to access this variable?

« previous php.general (#78380) next »