Thread: Redirection...

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    france
    Posts
    35
    Rep Power
    15
    Hi !

    I'd like to know how to redirect the browser to another page without using the header function beacause it's a hassle...
    Or I don't know how to use it...

    -
    J0f
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Melbourne, Victoria, Australia
    Posts
    104
    Rep Power
    14
    Well the header function is not hard, as long as you use it before anything you've outputted as html or that's not inside <?php ?> tags.

    Syntax usually goes:

    Header("Location: <A HREF="http://www.mysite.com/mypage.whatever");" TARGET=_blank>http://www.mysite.com/mypage.whatever");</A>

    The php manual is good. Read it.
    http://www.php.net/manual/function.header.php

    Yeeha.

    [This message has been edited by #6 (edited October 10, 2000).]
  4. #3
  5. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,642
    Rep Power
    4492
    You can also just have PHP output a little javascript.

    echo "<script language=javascript>location.href='your_page.html'</script>";

    That'll forward it to the new page.

Similar Threads

  1. iFrame redirection
    By cobas in forum ASP Programming
    Replies: 2
    Last Post: December 18th, 2003, 09:22 AM
  2. redirection with confirm problem...
    By jsKid in forum HTML Programming
    Replies: 3
    Last Post: December 16th, 2003, 06:56 PM
  3. frame redirection
    By genedavinci in forum PHP Development
    Replies: 3
    Last Post: July 26th, 2002, 03:27 AM
  4. Replies: 0
    Last Post: February 14th, 2002, 04:28 AM
  5. external redirection from a cgi
    By ninuzzo in forum Apache Development
    Replies: 1
    Last Post: June 7th, 2001, 03:46 PM

IMN logo majestic logo threadwatch logo seochat tools logo