Jon Benham6,444 Points
Email Form always defaulting to "Please fill in the required fields: Name, Email and Details"
I seem to be having trouble with submitting the email, whatever I do the code resorts to the first 'if' statement and outputs "Please fill in the required fields: Name, Email and Details".
I feel like I have followed the videos and code closely but clearly I am missing something somewhere!
Can anyone help?
I have attached a snapshot of my code here https://w.trhou.se/7b2vlx13lj
KRIS NIKOLAISEN54,332 Points
In suggest.php I added the following before your if statement:
echo $name . " " . $email . " " . $details;
and found that $details was blank
If you go to line 80 you'll find the name is details where it should be address
<td><input type="text" name="details" id="address">
<td><input type="text" name="address" id="address">
Pascal BreitrückPro Student 3,205 Points
fix the name propertie on the input field for the address . There is details set and this will overwrite the details in a blank field.
<td><input type="text" name="address" id="address" value="">
Ps. Use the var_dump() func. to debug things ;D like the $_POST :D