Date field not coming through

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

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 = <<<EOD

Name: $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
Homepage   Why   About us   Weddings     Contact Us

Thank you...

Thank you for contacting Weddings and More!

We will be in touch...


EOD; echo "$theResults"; ?>

In your form, the wedding date field is “Weddingdate” (first capital), but in your code it is spelled all lower case.

That was it - thanks! I was looking at the code so long I knew it was something small…

Sponsor our Newsletter | Privacy Policy | Terms of Service