[code]Aloha, friends! I have a contact form page with 2 separate contact forms on it, and it is not displaying or acting as intended. The page is live at http://fairmontolympiccatering.com/contact-fairmont-olympic-seattle.php. The problems are:
[ol][li]The Thank you message does not display when a form is submitted
The form is not being returned to my email address
In the past when the form was being returned to my email address, the content was blank (input not fcaptured/delivered)[/li]
[li][/li][/ol]
I am desperate to get this fixed, as my client has a big event coming up FAST. So, I am hoping a supremely kind PHP expert can help me fix what’s wrong. Here’s the code:
<?php /*echo ''; print_r($HTTP_POST_VARS); echo '';*/ $err = 0; if ($HTTP_POST_VARS['Submit']) { $email = $HTTP_POST_VARS['Email']; $name = $HTTP_POST_VARS['Name']; $company = $HTTP_POST_VARS['Company']; $mailingaddress = $HTTP_POST_VARS['Address']; $mailingcsz = $HTTP_POST_VARS['CSZ']; $phone = $HTTP_POST_VARS['Phone']; $comments = $HTTP_POST_VARS['Comments']; $drinks = $HTTP_POST_VARS['Drinks']; $altphone = $HTTP_POST_VARS['Alternate_Phone_']; $numberofguests = $HTTP_POST_VARS['Number_of_Guests']; $dateofevent = $HTTP_POST_VARS ['Date_of_Event']; $durationofevent = $HTTP_POST_VARS ['Duration_of_Event']; $eventtype = $HTTP_POST_VARS['Event_Type']; $cateringtype = $HTTP_POST_VARS['Catering_Type']; $site = $HTTP_POST_VARS['Site']; $source = $HTTP_POST_VARS['Source']; $commentquestion = $HTTP_POST_VARS['Question']; $tour = $HTTP_POST_VARS['Tour']; $quote = $HTTP_POST_VARS['Quote']; if ( strlen($name)<3 || strlen($numberofguests)<1 || strlen($email)<5) { $err=1; } } elseif ($HTTP_POST_VARS['Submit2']) { $name = $HTTP_POST_VARS['Name2']; $company = $HTTP_POST_VARS['Company2']; $email = $HTTP_POST_VARS['Email2']; $question = $HTTP_POST_VARS['Question']; if ( strlen($name)<3 || strlen($question)<1 || strlen($email)<5) { $err=1; } } //$mailto = "[email protected], [email protected]"; $mailto = '[email protected]'; $mailsubj = "Fairmont Olympic Catering Quote Request"; $mailhead = "From: $email\n"; if (!$err && $HTTP_POST_VARS) { reset ($HTTP_POST_VARS); $mailbody = "A visitor has submitted a quote request, comment, or question.:\n"; while (list ($key, $val) = each ($HTTP_POST_VARS)) { if(!empty($val) && $key !='Submit' && $key != 'Submit2') { if ($key == 'Name2') { $key = 'Name'; } if ($key == 'Company2') { $key = 'Company'; } if ($key == 'Email2') { $key = 'Email'; } $mailbody .= "$key : $val\n"; } } /// if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); } //print_r($mailbody); mail($mailto, $mailsubj, $mailbody, $mailhead); $email = ''; $name = ''; $phone = ''; $comments = ''; $drinks = ''; $altphone = ''; $numberofguests = ''; $dateofevent = ''; $durationofevent = ''; $company = ''; $eventtype = ''; $cateringtype = ''; $site = ''; $source = ''; $commmentquestion = ''; $tour = ''; $quote = ''; } ?>[/code]
and
[code]
Request a quote or a tour of our spaces Fill out the form below to tell us a little bit about your event, so we can plan a tour for you or put together a sample quote. You can also call us anytime!
|
Send us a question or comment
|