Re: Using and Echoing Session Variables

From: Date: Sun, 18 Jul 2004 11:10:50 +0000
Subject: Re: Using and Echoing Session Variables
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-190905@lists.php.net to get a copy of this message
Jason Would there be anything wrong with using an include statement at the top of every page and the include page could then start a session, execute queries etc or would the session not start as it's not the first line in the page...? -- ----------------------------- Michael Mason Arras People www.arraspeople.co.uk ----------------------------- "Jason Barnett" <jasbarne@indiana.edu> wrote in message news:20040718110010.90378.qmail@pb1.pair.com... > Harlequin wrote: > > > So If I needed say 10 session variables all based on field values in the > > database I'd have to execute 10 separate queries and assign each variable > > separately...? > > > > If that's the case then fine - as I only need do it once I know, but it does > > seem a rather long winded way of doing things. > > > > Yes, this is pretty much the case. If you *really* wanted to you could avoid > this by writing your own session handler - your custom session handler could > then read/write each index into db columns if you want. The default handler > acts the way it does because you might want to use non-db sources of > information, or different databases, etc. > > http://www.php.net/session_set_save_handler

« previous php.general (#190905) next »