Re: Problem with session

From: Date: Sat, 05 Feb 2005 12:07:02 +0000
Subject: Re: Problem with session
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-208114@lists.php.net to get a copy of this message
Greg Donald wrote:
On Sat, 05 Feb 2005 17:53:01 +0700, Thone <theeraputhm@siamcoolsite.com> wrote:
Hi, I don't know what I did it wrong but i can send any variable through seesion. I have something like this: //page1.php session_start(); $_SESSION['time_to_expire'] = time + ALIVE_TIME; //page2.php session_start(); print isset($_SESSION['time_to_expire']); always get '0';
How are you passing the session from one page to the next? You can pass it in the url or you can use transparent sessions (cookies). I would like to pass it through Cookie. But, I also tried to pass it by calling, using strip_tags(SID)
page2.php?PHPSESSID=xxxxxxxxxxxxxxxxxxxx But the result is the same. I wonder whether I have to register PHPSESSID on the page2.php? or I can just pass PHPSESSID and call session_start(). Thank you.

« previous php.general (#208114) next »