I built some code for a “contact page” I’m working on but for some reason the date field contents don’t come over in the email - it’s just Wedding Date:…
I am hoping someone might be able to look at the code and tell me what I might be doing wrong. Also, the contact page is located at http://www.weddingsandmore.us/contact.html
Any help would be greatly appreciated:)
<?php // Subject and email Variables $EmailSubject = 'Weddings and More Inquiry'; $webMaster = '[email protected]'; //Gathering Data Variables $nameField = $_POST['name']; $emailField = $_POST['email']; $weddingdateField = $_POST['weddingdate']; $guestsField = $_POST['guests']; $messageField = $_POST['message']; // Prepare email body text $body = <<<EODName: $nameField
Email: $emailField
Wedding Date: $weddingdateField
No of Guests: $guestsField
Message: $messageField
EOD; // Sending Email $headers = "From: $emailField\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail ($webMaster, $EmailSubject, $body, $headers); // Results rendered as html $theResults = <<<EOD Weddings and More EOD; echo "$theResults"; ?>