Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Scott Dunstan12,517 Points
Header() not working?
I couldn't for the life of me figure out why header() didn't seem to be functioning - turns out it was because I had a blank line at the top of the contact-process.php page. That blank line, and in fact any blank lines in that code constitutes output and renders the header() function ineffective on account of there being a rule that the code cannot produce ANY output BEFORE you call the header() function!
Ok, that makes sense based on what else I've read. After the php tag you should be able to do other processing and have blank lines before the header.