Page redirection?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shawn Northrop
    New Member
    • Jan 2007
    • 67

    Page redirection?

    Awhile ago i built a login script using php/mysql. At the end of the script i called a function header(location : (I don't remember exact sytax). This would redirect the page.

    Recently i have rebuilt this page using Motoma's Tutorial on Data Abstraction Layers (Great lesson for beginers) this put all of the connection/mysql interactions into a class(?) on another page (DAL.php) that i would then include.

    The problem now is i get an error saying Header already sent by DAL.php. Is there another efficient way to redirect?
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    It is usually because there are spaces, new lines, or other garbage before an opening <?php tag or after a closing ?> tag.

    It also displays the line number where the output is started.

    Comment

    • Shawn Northrop
      New Member
      • Jan 2007
      • 67

      #3
      that was it thanks!
      -Shawn

      Comment

      • Rhishabh07
        New Member
        • Jul 2007
        • 21

        #4
        header("locatio n:pagename.php" );

        pagename.php means where to redirect.use this on that page from where u wan to go on pagename.php

        --------------------------------------------------------------------------------

        Comment

        Working...