Page 2 of 2

Posted: Tue Oct 10, 2006 6:57 pm
by RobertGonzalez
To answer your headers sent error message, you cannot use header() if you have already sent something to the browser (even a blank space will cause this). You can use output buffering, but that is a band-aid approach in my opinion.

the trick is to take your form data, validate it, then assign it (or assign/validate) then put it into use. header() when you are done, but only before sending content to the browser.

Posted: Tue Oct 10, 2006 9:04 pm
by keress
I got rid of the error message by cleaning up extra spaces. I got it to stop outputting it as HTML code instead of a formatted message by putting back the $additional_headers variable in the header command and uncommenting it at the top. I'm curious now what this variables is, and why it made such a difference.

Posted: Tue Oct 10, 2006 11:43 pm
by RobertGonzalez
The additional headers are used to send information to sendmail so it knows what to do with the message. This should have had no effect on the output, only the message.