Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
header() method has no effect
I've tried to use different examples of header("Location: name.php");, but nothing seems to work. I still get the contact-process.php page. What might be wrong?
Can you post your code?
header doesn't work if you output any html before it. Having a blank line before your opening php tag is considered output and would be one cause on why this is not working.
Samiruddin Syed3,136 Points
Th header function works only if you write it correctly, notice the "L" in your header location is in uppercase letters. It should be
Try to avoid spaces where they aren't required :)
Hope that helps.