go back and enter the correct anti-spam code.'); } if ($_POST['Name'] == '') { die ('Your name is required. Please go back and enter data in the name field.'); } if ($_POST['Email'] == '') { die ('Your email address is required. Please go back and enter data in the email field.'); } if ($_POST['Phone'] == '') { die ('Your phone number is required. Please go back and enter data in the phone field.'); } if ($_POST['NoRelationship'] != on) { die ('You must check the box indicating you understand that by sending Qualls & Workman and email you are not creating an attorney-client relationship. Please go back and check the required box.'); } function clean_data($string) { if (get_magic_quotes_gpc()) { $string = stripslashes($string); } $string = strip_tags($string); // $string = mysql_real_escape_string($string); return $string; } function remove_headers($string) { $headers = array( "/to\:/i", "/from\:/i", "/bcc\:/i", "/cc\:/i", "/Content\-Transfer\-Encoding\:/i", "/Content\-Type\:/i", "/Mime\-Version\:/i" ); $string = preg_replace($headers, '', $string); return strip_tags($string); } $mailTo = 'qualls@qualls-workman.com'; $email = clean_data(remove_headers($_POST['Email'])); $mailHeaders = 'From: '.$email."\r\n"; $mailFrom = $mailHeaders; $mailHeaders .= ''; $mailSubject = 'Qualls-Workman.com Contact'; $mailContents = ''; foreach($_POST as $key => $value) { if ($key <> 'Referrer') { $key = clean_data(remove_headers($key)); $key = str_replace('_', ' ', $key); $value = clean_data(remove_headers($value)); $mailContents .= $key.': '.$value.' '; } } //$mailContents = nl2br($mailContents); if (mail($mailTo, $mailSubject, $mailContents, $mailHeaders)) { $formText = '

Thank you. We have received your message.

'; } else { $formText = '

Sorry, we didn\'t get your message.

'; } } else { $fieldWidth = 30; $AntiSpamCode = rand(100,999); $formText = '

(Required)


(Required)

(Required)



Yes No





Yes No



(Required)

I understand that sending Qualls & Workman an email does not create an attorney-client relationship. (Required)

'; } ?> Qualls Workman LLP