I\'m creating a script to validate a form and I was asking myself a question. When I use a header (see example below), do I need to use exit right after? I mean, does using head
Output is generally not sent (depending on output buffering and so on) if you redirect like that, but as shown by the unlink() example the script does not die with header().
So the exit() or die() calls are necessary if you want to prevent the script from continuing after the redirect.