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 trialCarlos Federico Puebla Larregle
21,074 PointsIt appears an empty array with no data in it. I don't know what I'm doing wrong.
I put the "action=process.php" property in the form tag then I created the php file with the same name, just like the professor did. Then I put the "<?php var_dump($_POST); ?>" code, send it again but it appears an empty array instead of the array with all the information submitted.
3 Answers
Romuald Le Bris
3,975 PointsI guess your problem is now solved but for the one's who might come back to this discussion for a similar problem,
Make sure that the name="" of your input corresponds to the name you declare in your $_POST[""] variable. Otherwhise the input value will be defined as Null.
<td><input type="text" id="email" name="usermail"/></td>
$email = $_POST["email"];
// Here the value will be Null because we look for the name "useremail", not "email" in our input form.
Hope it will help some of you =)
Murat Hasdemir
Front End Web Development Techdegree Graduate 20,968 Pointscan't be sure without any code but did You write as
<form action="process.php" method="post">
...
</form>
Carlos Federico Puebla Larregle
21,074 PointsThank you very much Murat, I had a sintax error in that line.