Results 1 to 3 of 3

Thread: Using META HTTP-EQUIV=REFRESH Question

  1. #1
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Using META HTTP-EQUIV=REFRESH Question

    Hi guys.

    I'm using the:

    Code:
    <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:

    Code:
    <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.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    <?php if(!isset($_GET['referral'])) { ?>
    <META HTTP-EQUIV="REFRESH" CONTENT="0;URL=index.php?referral=1">
    <?php } ?>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •