session_register("sessionvar"); you can now assign values to $sessionvar (or whatever you've chosen to call it). You need to register each variable and start the session at the top of each script.
In practice it's a lot easier if you hold all your session stuff under a single hash array, that way you only need to do 1 session_register and you don't have to worry about post/get variable names clashing with session variables. If this doesn't work look at your track_vars and register_globals settings. See http://www.php.net/manual/en/ref.session.php <http://www.php.net/manual/en/ref.session.php> . Tim Ward www.chessish.com <http://www.chessish.com> ---------- From: Tomasz Jachimczak [SMTP:[EMAIL PROTECTED]] Sent: 20 December 2001 14:53 To: [EMAIL PROTECTED] Subject: Help with Sessions - Should be easy =] I am coming from an asp background, and am used to setting session variables very easily, but I cannot work them out here with all the different commands. I would like to store in a session variable output from a mysql db (Got the db bit working fine) but cannot for the life of me store or retrieve anything from a session variable. (more information if required) 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. I have the latest official PHP, running with IIS on a Windows 2K server with IIS. More questions to follow no doubt, Thanks in advance, - Tomasz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]