hello everybody. i am trying to set up a script where links are directed to a page for 5 seconds, then redirected to the original page. for example, if you click on a link to mysite.com/help.php you will be taken to ad.php then redirected back to help.php.
to do this i am using html redirects
<html>
<head>
<?php
if($_SERVER['HTTP_REFERER'] != 'http://www.mysite.com/ad.php')
{
echo '<META HTTP-EQUIV="Refresh" CONTENT="0;URL=http://www.mysite.com/ad.php">';
}
?>
</head>
<body>
and it redirects fine. the problem i have is getting it back to the refering page. on ad.php i have this
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="5;URL=<?PHP echo $_SERVER['HTTP_REFERER']; ?>"
</head>
<body>
which works if i click on a link directly to ad.php. but when i use a redirection like in the top example, ad.php just refreshes itself without ever going back to the refering page. i have tried adding
<?PHP
echo $_SERVER['HTTP_REFERER'];
?>
to the ad.php file which displays the refering page when it is linked to directly, but when the redirect is used the echo is not displayed and i can only assume that $_SERVER['HTTP_REFERER'] is not being set.
Here is an example of my problem if you need it http://www.tomyn.com/trill.php
sorry for the long explanation. Any ideas on why this would happen?
thanks