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
ricardo leiva sikic
1,463 Pointsphp form
i have a problem with my contact form on my website,
the contact form send me blank emails i dont know why
ricardo leiva sikic
1,463 Pointslive.
1 Answer
Matt Wilding
4,616 PointsHi Ricardo - posting the form HTML and the PHP that is receiving the form data and constructing the email would help in debugging directly. Common issues for this kind of scenario include: Not accepting the $_POST data in your PHP script, Not referencing the $_POST data - eg, referencing a field such as $email_address instead of $_POST['email_address'], Not setting up the mail properly - eg. omitting the subject or content strings.
Steps in debugging that may help include dumping all posted data to the output ( var_dump() or print_r() ), echoing the individual mail fields.
Hope this helps you with the issue.
thomascawthorn
22,986 Pointsthomascawthorn
22,986 PointsIs this local or live?