I have a script that sets a cookie and then redirects the user to another page. I am having a problem though. The script runs and redirects but seems to not set the cookie. It is almost like the redirect runs to fast. I know that sounds silly but if I take out the redirect and have the page display a link instead - no problem. Maybe I am doing somthing wrong.
Here is the code:
$expire=time()+86400;
$value="blah";
setcookie("cookie",$value,$expire);
header("Location: redirect.php");
exit;