Hi
trying to set up a cookie where the user is directed to a splash page that will show special offers
From the web I've gleaned some code so on the index.php page I added above the head
<?php
if( !(isset($_COOKIE["splashCookie"])) ) {
header("Location: }
?>
This seems to work but when I close the browser and restart it it always goes to the splash page.
On splash page I've added the code
<?php
if( !(isset($_COOKIE["splashCookie"])) ) {
setcookie("splashcookie", "visited", time()+(60*60*24*5), "/", "", 0);
}
?>
So the code is wrong somewhere.
Can someone assist?
thanks
trying to set up a cookie where the user is directed to a splash page that will show special offers
From the web I've gleaned some code so on the index.php page I added above the head
<?php
if( !(isset($_COOKIE["splashCookie"])) ) {
header("Location: }
?>
This seems to work but when I close the browser and restart it it always goes to the splash page.
On splash page I've added the code
<?php
if( !(isset($_COOKIE["splashCookie"])) ) {
setcookie("splashcookie", "visited", time()+(60*60*24*5), "/", "", 0);
}
?>
So the code is wrong somewhere.
Can someone assist?
thanks