Print Reseller Scheme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to redirect users to another page midway through a PHP script?

Discussion in 'Website Design Forum:' started by Cathy, Apr 19, 2011.

  1. Cathy

    Cathy Junior Member

    Just wondering if anyone would be able to help me come up with a solution to a problem I have..

    Basically, I have created a simple login system in PHP and atm, when the user logs in with a valid username and password, the script echos a link to the password protected page. Is there something I could add to the script so that when someone logs in successfully, they are automatically taken to the protected page?
  2. Kevin

    Kevin Senior Member

    EDIT: This is the correct way apparently

  3. gwebhostuk

    gwebhostuk Junior Member

    use following :


    Do not forget to put <?php ob_start(); ?> at the top of your file

Share This Page