Hi There,
I wrote some PHP code for a simple “Contact Us” page for a website I’m working on, but it doesn’t seem to be working. I do get the emails, though the email addy is that of the hosting co. and not the user whom filled out the form, the Subject line I specified doesn’t come over, neither does any of the other fields in form either. I’ve copied and pasted the code below, PLEASE let me know if anyone out there can offer some assistance. Also, the website that this is for is www.weddingsandmore.us
Thanks a TON in advance - this one has me stumped. : THANKS!
<?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: $name
Email: $email
Wedding Date: $weddingdate
No of Guests: $guests
Message: $message
EOD; // Sending Email $headers = "From: $email\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"; ?>
Hope to hear from someone soon… ;D
-Dre