0

I have a script in website.com/login/, it contains all the files and forms need to proccess user authentication and contains the forms as well. I have the main login form on my main index, website.com/index.php. I have successfully directed the form to post /login/login-exec.php, but once the script has run it redirects to /login/login-success.php, not website.com/index.php?od=logsucc. How would i go about telling the login-exec.php to redirect to the main folder of the website instead of /login/?

1 Answers1

0

use

header( 'Location: /index.php?od=logsucc' );

the leading / says go back to the site root directory.

Jay Blanchard
  • 33,530
  • 16
  • 73
  • 113
RiggsFolly
  • 89,708
  • 20
  • 100
  • 143