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
Morrice Pfeiffer
4,162 PointsPHP HTML Code Question
I am doing some of the extra credit assignments in PHP "adding a contact form" Attached is the code plus my error message. know the error message is telling me that there null value represents a variable with no value. I just don't see where the error is. BTW it does work its just when I do $_POST my Payment Title shows up but the data field is empty.
<?php
$name = $_POST["name"];
$email = $_POST["email"];
$message = $_POST["message"];
$payment = $_POST["payment"];
$email_body = "";
$email_body = $email_body . "Name: " . $name . "\n";
$email_body = $email_body . "Email: " . $email . "\n";
$email_body = $email_body . "Message: " . $message . "\n";
$email_body = $email_body . "Payment: " . $payment;
echo $email_body
?>
2 Answers
kljnnkl gvhhgv
3,175 PointsCode looks good to me. I'd say you made a mistake inside the Form. Make sure you place the values right. Something like <option value="50">Text of the Element</option>
Morrice Pfeiffer
4,162 PointsGot It
let me check
thanks
M