Hi
I’m new to this and attempting to get a HTML contact form to send the data to an email address.
I have got to the point where I am receiving an email with the title of each section of the form but it does not contain what was submitted.
Attached is my HTML Form
Any suggestions would be appreciated.
This is my PHP code:
<?php $to = "[email protected]"; $subject = "Website Contact Form"; $name = $_POST['name'] ; $email_from = $_POST['email'] ; $telephone = $_POST['telephone'] ; $website = $_POST['website'] ; $message = $_POST['message'] ; $MESSAGE_BODY = "Name: ".$_POST["name"]."\n"; $MESSAGE_BODY .= "Telephone: ".$_POST["telephone"]."\n"; $MESSAGE_BODY .= "Email: ".$_POST["email"]."\n"; $MESSAGE_BODY .= "Website: ".$_POST["webiste"]."\n"; $MESSAGE_BODY .= "Message: ".nl2br($_POST["message"])."\n"; $message = $_POST['name' + 'message' + 'email' + 'telephone'] ; $from = $_POST['email'] ; $headers = "From:" . $from; mail($to,$subject,$MESSAGE_BODY,$headers); echo "Mail Sent."; ?>contact_form_html.pdf (16.1 KB)