I am trying to forward someone to a page if there is no cookie set, and then to a different page when it is set. Here is my script, and it does not seem to be working. it only forwards them to the first page even if the cookie is set when they view my page with the script on it.
<?php
setcookie ('cookie', date("F jS - g:i a"), 604800 + time()) ;
if (isset($_COOKIE[cookie])){
header( 'Location: http://www.location_1.com' ) ;
}
if (!isset($_COOKIE[cookie])){
header( 'Location: http://www.location_2.com' ) ;
}
?>
#Please Help, thanks 🙂