QUOTE(pyost @ Sep 14 2007, 02:32 AM)

It is only a matter of time until you receive an error message saying "Headers already sent" - this will, of course, disallow you to redirect the user to another page. This is because you have already outputted some data to the page. If you ever encounter this problem, and you can't avoid it, you will have to use JavaScript.
CODE
<script type="text/javascript">
window.location = "Redirection URL";
</script>
As this can be used anywhere in the page, it is more convenient, but header() is always a better option

Or learn how to use
ob_start(), and the associated functions.
QUOTE
This function will turn output buffering on. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer.
Comment/Reply (w/o sign-up)