Can't send cookie and redirect together (php3/IIS)
| From: | editor | Date: | Thu, 01 Jun 2000 20:13:00 +0000 |
| Subject: | Can't send cookie and redirect together (php3/IIS) | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-178@lists.php.net to get a copy of this message | ||
I'm trying to set a cookie and redirect to a new page. I've tried:
setcookie("cookieName",$value,);
header ("Location: http://www.foo.com");
It does the redirect, but doesn't set the cookie. If I comment out the
redirect, it sets the cookie. If I switch the order of the lines it
does the redirect before it ever gets to the cookie line. I tried
combining the cookie and the redirect into a single "header()" call, but
couldn't find a syntax that works.
I know this should be simple, but I can't get it. Any suggestions?