Hey there, i was wondering if someone could help me out with what im doing.
Im trying to make it so that whenever someone new comes to ANY of the pages in my site, it the url refreshes to a "first time here" page. But when the user comes back to any of the pages, it just normally follows the url, and doesn't go to the first time page again.
Here's the code im using (and putting on every single page in my website.):
<?php
if(!isset($PageViewed))
{
header ("Location: http://tpi.ppgworld.com/entrance.php3");
setcookie ("PageViewed", "TRUE");
exit;
} else {}
?>
What it seems to be doing though, is working seperatly for every single page, like if i were to go to one page that I have already been to, it would work. But it would do the whole 'first time' page allover again.
Is there a way I could set the cookie to make it global, and not execute the script for every single page, but rather only once from any of the pages.
Thanks!
-Andrew