Using header() to redirect

Discussion in 'PHP' started by dukeofism, Aug 30, 2009.

  1. #1
    I'm trying to use header() to redirect to a page with a refresh time, but its not working. See code:

    ((code))
    <html>
    <?php
    header( 'Refresh : 2; url=/index.html');

    ?>
    ((/code))
     
    dukeofism, Aug 30, 2009 IP
  2. UtemptMe - Ed

    UtemptMe - Ed Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
  3. dukeofism

    dukeofism Peon

    Messages:
    739
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I tried removing the <html> tag at the top of the code but it still does not work
     
    dukeofism, Aug 30, 2009 IP
  4. dukeofism

    dukeofism Peon

    Messages:
    739
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Figured it out. Had an extra space between refresh and the :. Spent too long looking at simple code. Mind turned into jelly
     
    dukeofism, Aug 30, 2009 IP