Re: Using and Echoing Session Variables
| From: | Jason Barnett | Date: | Sun, 18 Jul 2004 11:00:05 +0000 |
| Subject: | Re: Using and Echoing Session Variables | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-190902@lists.php.net to get a copy of this message | ||
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