I've been trying to find a tutorial and doing trial and error scripting to try and figure out how to create a page that is only view on a visitors first visit to my site and then they don't see it again. It's for a warning/disclaimer at the entrance to my website, but I don't want my visitors to have to view that page EVERY time they enter my site.
The code I'm trying to get it to work with is:
$choose = ($_POST['choose']);
// If they do accept..
if ($choose == 'yes')
{
header("Refresh: 2; URL=main.php");
echo " "; }
// If they do not choose..
elseif ($choose == '')
{
echo 'Sorry, you must choose "yes" or "no" to be able to continue on to the site or leave by this method.<br />';
echo '<a href="javascript:history.back(1)">Try again</a>.';
}
// If they do not accept..
else
{
header("Refresh: 20; URL=http://www.google.com/");
echo "You are now being redirected to a safer website. Please wait...<br /><br /><br />
Although we are very sad to see that you will not be joining our fun, we appreciate that you actually took the time to read and understand our warnings. Here's hoping you surf across something more accommodating to your needs. <br /><br /> Thanks for stopping in,<br />The Management."; // NN4 requires that we output something...
exit(); }
If anyone has any ideas are actually knows how to do this, I would certainly appreciate the advice/help.
Thanks,
Tyr.
