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
Vishay Bhatia
1,293 PointsMy contact form doesn't submit across the information to the server
I am currently on the topic of 'WORKING WITH POST VARIABLES'.
I have followed everything the video told me to do in regards to adding:
<form method = "post" action="contact-process.php">
and then creating a new file called contact-process.php
However, when I reload the localhost page, it doesn't submit the info across. If I manually type in http://localhost/contact-process.php
I get array(0) { } cause no info has been sent across.
It should be such an easy task!
3 Answers
Vishay Bhatia
1,293 PointsSorry guys. I solved my own problem. It turned out after staring at my screen for 2 hours figuring out why it wasn't working, I had forgotten to put the closing '>' for my form submit button from the previous lesson.
Ugh I can't believe I wasted so much time on a silly mistake like that!
Vishay Bhatia
1,293 PointsThanks Tom. Will definitely check it out. Cheers.
William Schott
1,624 Pointshaving the same problem
Tom Bedford
15,645 PointsTom Bedford
15,645 PointsThe w3 validator can be helpful for finding errors like that. You can view the source of the loaded page in a browser and copy/paste it into the validator using the "direct input" tab.
James Barnett
39,199 PointsJames Barnett
39,199 PointsThe W3 validator only has experimental HTML5 support, that's why there's W3 validator that uses the nu engine which has full HTML5 support
http://validator.w3.org/nu/