problem in direct user to the other page in middle page with having html tags in page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oranoos3000
    New Member
    • Jan 2009
    • 107

    #1

    problem in direct user to the other page in middle page with having html tags in page

    hi
    I have a login page in my site for login member
    I want to any user that arrival correctly directly go to page1.php
    I use header statement(heade r("Location: page1.php"))
    in middle page that befor I have Html tage and the other echo statement
    now header statement dont direct user to page1.php because before
    this statement this html tags and echo statement go to output
    what do I have to for direct user to this page ?
    thanks alot
  • stepterr
    New Member
    • Nov 2007
    • 157

    #2
    Oranoos,
    Be sure that you do not have any text sent to the browser before your redirect, or it will not work.

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      Move the header function to the beggining of the page before anything is outputted to the browser. Of course, there's no point in having any HTML on the page because it will never be seen...

      Comment

      Working...