|
Because of the way your php is set up (i.e. it's processed after html is written to the page), the headers have already been sent when you try to do that header("Location: xxx") redirect.
The easiest way to fix this would be to split it up into two files and have it post instead of get. The other way would be to check if the form has been submitted already before outputting any HTML. That way, if it has, you can redirect and no headers will have been sent yet.
|