Example :
<?php
header("Location: foo.php");
processStuff();
?>
Even though the user is redirected above, processStuff() will still get executed. In otherwords don't worry about what the user does (client side), it (server side) should continue to execute regardless ... of course this assumes you aren't using break or die() beforehand.