View Full Version : Question about using header("Location: ..")

06-08-2007, 08:30 PM
Hey guys..... I was wondering if you use, for example:

header("Location: index.php");

..will the code AFTER the redirect still be executed; or will the script terminate once it hits the redirect?


06-08-2007, 08:58 PM
The header(...) statement only outputs the header to the browser that is viewing the current page. It is the browser that requests the different page. If you have PHP code that you don't want executed that is after the header(...) statement, you need to put an exit() statement in your code.

06-08-2007, 10:41 PM
Ok. thank you! :thumbsup: