SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a way to direct a browser to a page directly with PHP?
    Basically I just want to direct the user to one of two pages...depending on a condition.
    I think I've seen this question asked here before, but can't find it now...any help would be great.
    Thanks in advance, guys

  2. #2
    SitePoint Evangelist
    Join Date
    Jul 2000
    Location
    Warwickshire, England
    Posts
    557
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    to redirect, you need to use a HTTP header.

    try
    header ("Location: http://yoursite.com/page");

    This must be done before anything is printed!
    (i.e. before you use print, printf, echo, etc)


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
  •