the question about cookie and head-location

From: Date: Fri, 09 Jun 2000 02:01:57 +0000
Subject: the question about cookie and head-location
Groups: php.windows 
Request: Send a blank email to php-windows+get-344@lists.php.net to get a copy of this message
editor said: "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?" Now,I meet the same question. How to I can do? Jerry Qian

« previous php.windows (#344) next »