Re: setcooke(...) before header("Location: XYZ") - Cookie doesn't set!

From: Date: Wed, 22 Jan 2003 03:17:40 +0000
Subject: Re: setcooke(...) before header("Location: XYZ") - Cookie doesn't set!
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-132545@lists.php.net to get a copy of this message
I tried a test file with this, and the form is sent, and the nph-test2.php file returns this Status: 302 Content-type: text/html X-Powered-By: PHP/4.3.0 Location: test.php Set-Cookie: testcookie=test Here is my code: <?php header("HTTP/1.0 302 Redirect"); header("Location: test.php"); header("Set-Cookie: testcookie=test"); ?> Thanks for your time. Mike "Michael Sims" <mhsims@midsouth.rr.com> wrote in message news:881s2vsfpndvia28ho2a1dniupkdfpbco3@4ax.com... [top-posting fixed] >"Jason K Larson" <jlarson@candlefire.org> wrote in message >news:3E2DDD9C.7050009@candlefire.org... >> Discussion on this list has suggested that it can work if PHP is set to >> run as ISAPI, not CGI. >> >Do you know how do do this? Although using the ISAPI dll version of PHP would definitely work, that's a bit of a drastic solution. Chris has pointed you in the direction of a workaround. Why don't you give it a shot and if you can't get it working send another message to myself or the list: http://marc.theaimsgroup.com/?l=php-general&m=102929828515647&w=2

« previous php.general (#132545) next »