RE: [PHP-WIN] Re: header-session problem
| From: | HKG) | Date: | Mon, 16 Feb 2004 10:24:20 +0000 |
| Subject: | RE: [PHP-WIN] Re: header-session problem | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-22832@lists.php.net to get a copy of this message | ||
Are saying that session can not persist over different pages?
-----Original Message-----
From: Alan McDonald
To: php-windows@lists.php.net
Sent: 2004-02-16 10:57
Subject: [PHP-WIN] Re: header-session problem
I'm afraid that's not what the seesion is all about.
The session is a unique value. It is assigned to a cookie if specified
in php.ini or is tagged along in all your URLs as a query string or $_GET
and has the name PHPSESSID by default unless you change it.
If you want to save something fro page 1 and retrieve it in page 3, then
you will need to do the same hing and store this value as a cookie.
$_COOKIE['cookiename'] will retrieve it.
But there are some provisos. You cannot assign a cookie value and set
header("Location.. etc on the same page, the cookie will not be set. You
need to set a cookie and let the page return to the browser.
That's with Windows environments anyway.
Alan