#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    12
    Rep Power
    0
    Does anyone know how to redirect in PHP?

    go_to_url => "www.gothere.com"

    An easy one, I know. I thought I knew how, but I guess not.

    Thanks,

    Terry Scott

    [This message has been edited by TerryS999 (edited June 14, 2000).]
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    SLC, UT, USA
    Posts
    47
    Rep Power
    15
    Something like this might work:

    header("Location: <A HREF="http://www.foo.com/");" TARGET=_blank>http://www.foo.com/");</A>

    Robman
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    12
    Rep Power
    0
    It's after the header has been written though.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    60
    Rep Power
    15
    When I need a 'splash' sort of page, I just use javascript for a redirect, then redirect to another php page if I need to.

    <SCRIPT>
    <!--
    function autoChange()
    {
    var timeID = setTimeout("location.href= 'http://www.site.com'", 5000)
    }

    //-->
    </SCRIPT>


    And include 'onLoad="autoChange()' in the Body tag.

  8. #5
  9. No Profile Picture
    Dz9r
    Guest
    Devshed Newbie (0 - 499 posts)
    <?PHP

    header("location: <A HREF="http://www.whereuwanttoredirect.com/");" TARGET=_blank>http://www.whereuwanttoredirect.com/");</A>

    exit;
    ?>

    The exit will prevent the program from running (stops memory leaks)


Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 10:45 PM
  2. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 01:14 PM
  3. Passing string from PHP to Javascript
    By ka8oad in forum JavaScript Development
    Replies: 4
    Last Post: January 17th, 2004, 03:12 PM
  4. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 01:41 PM
  5. php redirect without using header?
    By mickeyren in forum PHP Development
    Replies: 4
    Last Post: January 14th, 2004, 07:00 PM

IMN logo majestic logo threadwatch logo seochat tools logo