Log in

View Full Version : Using META HTTP-EQUIV=REFRESH Question



remf
07-30-2006, 12:40 PM
Hi guys.

I'm using the:


<META HTTP-EQUIV="REFRESH" CONTENT="0;URL=test.html">

...tag to refresh content on my page. At the moment a user logins to the site at index.php. I want to change the link so that when the user logins to the index.php they are instantly redirected to the same page but with a referral tag on it, so I can track sign ups etc. So for example I tried this:


<META HTTP-EQUIV="REFRESH" CONTENT="5;URL=index.php?referral=1">

Only problem with this, is that it puts things into a loop. Now I realise that the reason because of this is because I'm not redirecting out onto another page, but is there anyway to stop the loop from occuring? I want an instant, one time refresh, so that the referral URL is displayed rather than the standard index.php.

Any suggestions appreciated.

Twey
07-30-2006, 01:00 PM
<?php if(!isset($_GET['referral'])) { ?>
<META HTTP-EQUIV="REFRESH" CONTENT="0;URL=index.php?referral=1">
<?php } ?>

remf
07-30-2006, 03:46 PM
Hmm thanks for the suggestion but it continues to keep looping. I just want it to refresh once and then lock, rather than just looping continuously...