Re: Getting Cookie after Rederection...

From: Date: Tue, 01 Aug 2000 12:00:01 +0000
Subject: Re: Getting Cookie after Rederection...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9416@lists.php.net to get a copy of this message
Hi Martin! On Tue, 01 Aug 2000, Martin Thoma wrote: > 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(); I noticed the same behaviour with Netscape on Linux. I dunno if it's NS related, or that the server sees it is a redirection to itself and resolve it w/o informing the browser. My trick is: 1. setCookie and also put it by myself in $HTTP_COOKIE_VARS 2. `include' the target files, which will find the info where it was supposed to be. -- teodor

« previous php.general (#9416) next »