We are very sorry, but there were error(s) found with the form you submitted“; echo “
“; echo “Please go back and correct these errors:
“; echo “
    “; echo $error; echo “
“; } function clean_string($string) { $bad = array(“content-type”,”bcc:”,”to:”,”cc:”,”href”); return str_replace($bad,””,$string); } // validation expected data exists if(!isset($feed_first) || !isset($_POST[‘feed_last’]) || !isset($_POST[‘form_email’])) { died(‘We are sorry, but there appears to be a problem with the form you submitted.’); } # $feed_first = $_POST[‘feed_first’]; // required # $feed_last = $_POST[‘feed_last’]; // required #$form_email = clean_data( $_POST[‘form_email’] ); #$feed_first = clean_data( $_POST[‘feed_first’] ); #$feed_last = clean_data( $_POST[‘feed_last’] ); #$feed_phone = clean_data( $_POST[‘feed_phone’] ); #$feed_comments = clean_data( $_POST[‘feed_comments’] ); //$feed_comments = $_POST[‘feed_comments’]; // optional //$Code= $_POST[‘Code’]; # $feed_interest = ‘None’; # if(isset($_POST[‘feed_interest’]) && is_array($_POST[‘feed_interest’]) && count($_POST[‘feed_interest’]) > 0){ # $feed_interest = implode(‘, ‘, $_POST[‘feed_interest’]); # } $contact_url = “https://www.oldcabin.com/contact-oc/”; $realip = $_SERVER[‘REMOTE_ADDR’]; $iprefer = $_SERVER[‘HTTP_REFERER’]; $error_message = “”; $code2 = “28Xp53b”; if ($Code !== $code2) { $error_message .= ‘
  • You must enter the security code or the Code is incorrect: You entered ‘ . $Code . ‘. The correct code is ‘. $code2 .’ and the code is CASE Sensitive
  • ‘; } $string_exp = “/^[A-Za-z .’-]+$/”; if ($iprefer !== $contact_url) { $error_message .= ‘
  • You are trying to call this form from an unauthorized URL. How come?
  • ‘; } $string_exp = “/^[A-Za-z .’-]+$/”; if(!preg_match($string_exp,$feed_first)) { $error_message .= ‘
  • The first name you entered does not appear to be valid.
  • ‘; } if(!preg_match($string_exp,$feed_last)) { $error_message .= ‘
  • The last name you entered does not appear to be valid.
  • ‘; } //do nothing for phone as not required $email_exp = ‘/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/’; if(!preg_match($email_exp,$form_email)) { $error_message .= ‘
  • The email address you entered does not appear to be valid.
  • ‘; } if(strlen($error_message) > 0) { died($error_message); }else{ echo “

    Thank you for your inquiry

    “; echo “
    “; echo “We will be in touch with you very soon.
    “; echo “
    “; echo ““; echo ““; $email_message = “$email_subject \n”; $email_message .= “\n”; $email_message .= “************************************************************* \n”; $email_message .= “First name: “.clean_string($feed_first).”\n”; $email_message .= “Last name: “.clean_string($feed_last).”\n”; $email_message .= “Phone: “.clean_string($feed_phone).”\n”; $email_message .= “Email address: “.clean_string($form_email).”\n\n”; $email_message .= “Questions: “.clean_string($feed_comments).”\n\n”; # $email_message .= “Order Number(s): “.clean_string($orderno).”\n\n”; # $email_message .= ” “.clean_string($file).” Send them this link https:///blablabla-TBA \n\n”; $email_message .= “IP Address: “.clean_string($_SERVER[“REMOTE_ADDR”]).”\n”; $email_message .= “IP Address 2: “.$realip.”\n”; // create email headers $headers = ‘From: ‘.$femail.”\r\n”. ‘Reply-To: ‘.$form_email.”\r\n” . ‘X-Mailer: PHP/’ . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); } } ?>