The redirect is not necessarily performed when the header() command is issued in your script. Rather, it occurs when the headers are actually sent to the browser, which is normally when your first output is generated. Therefore, a "Location:" header() command does not, by itself, halt your script. So if you want to ensure that nothing else is done by your script when you decide you want to redirect your user, then putting an exit right after the header() will do so.