Re: Sessions
| From: | Daniel Brown | Date: | Fri, 03 Jul 2009 03:39:28 +0000 |
| Subject: | Re: Sessions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294841@lists.php.net to get a copy of this message | ||
On Thu, Jul 2, 2009 at 23:27, Jason Carson<jason@jasoncarson.ca> wrote:
> Hello all,
>
> Do I have to add session_start() at the beginning of every page so that
> the $_SESSION variables work on all pages or do I use session_start() on
> the first page and something else on other pages?
Yes, unless you're using session autoloading. Also, in most
cases, you will only need to call session_start() once (before
referencing $_SESSION), even if $_SESSION is accessed in an included
file.
--
</Daniel P. Brown>
daniel.brown@parasane.net || danbrown@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our hosting and dedicated server deals at http://twitter.com/pilotpig