Getting Cookie after Rederection...
| From: | Martin Thoma | Date: | Tue, 01 Aug 2000 11:25:16 +0000 |
| Subject: | Getting Cookie after Rederection... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9405@lists.php.net to get a copy of this message | ||
Hello !
I found that the problem is another:
I set a cookie with "setCookie". In the same script, I use
Header("Location:anotherfile.php") to redirect the script.
In "anotherfile.php" I want to get the cookie set bevore. But the
Variable $HTTP_COOKIE_VARS is empty ! It doens't even appear on
phpinfo();
When redirecting with JavaScript or Meta-Tag or when calling another
page from "anotherfile.php" the cookie is there again.
Any ideas ? Is there, because of the Header("location..), that the
browser thinks that antoherfile.php is the same file where I set the
cookie and has therefore not initialised the cookie ? Any ideas to do it
WITHOUT using JavaScript or Meta ?
Regards
Martin