You know that if you want to redirect an user in PHP you can use the header function:
header(\'Location: http://smowhere.com\');
It is also
If you redirect but you don't die()
/ exit()
the code is always executed and displayed.
Take the following example:
admin.php:
if (authenticationFails)
{
// redirect and don't die
}
// show admin stuff
If you don't make sure to end the execution after the location header every user will gain access.