Re: PHP session variables
| From: | Tedd Sperling | Date: | Thu, 09 Aug 2012 20:45:17 +0000 |
| Subject: | Re: PHP session variables | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-318659@lists.php.net to get a copy of this message | ||
On Aug 8, 2012, at 5:41 PM, Jim Giner <jim.giner@albanyhandball.com> wrote:
> On 8/8/2012 11:24 AM, Ansry User 01 wrote:
>> I am setting the _SESSION variables in one of my file, but whenever I leave the php page
>> session variables are not accessible. Not sure what I need to do additionally other then defining
>> _SESSION[].
>> Any pointer.
>>
> You must make it a habit to start each script with
>
> session_start();
>
I like this way:
if (!session_id())
{
session_start();
}
Cheers,
tedd
_____________________
tedd@sperling.com
http://sperling.com