2416 Gravel Drive
Fort Worth, Texas
Phone: 817.595.0100
Fax: 817.595.0125









Contact Us

 
























 
== No data was submitted.

"; print ""; exit(); } function clear_user_input($value) { if (get_magic_quotes_gpc()) $value=stripslashes($value); $value= str_replace( "\n", '', trim($value)); $value= str_replace( "\r", '', $value); return $value; } if ($_POST['comments'] == 'Please share any comments you have here') $_POST['comments'] = ''; //Create body of message by cleaning each field and then appending each name and value to it $body ="Here is the data that was submitted:\n"; foreach ($_POST as $key => $value) { $key = clear_user_input($key); $value = clear_user_input($value); if ($key=='extras') { if (is_array($_POST['name']) ){ $body .= "$key: "; $counter =1; foreach ($_POST['name'] as $value) { //Add comma and space until last element if (sizeof($_POST['name']) == $counter) { $body .= "$value\n"; break;} else { $body .= "$value, "; $counter += 1; } if (is_array($_POST['address']) ){ $body .= "$key: "; $counter =1; foreach ($_POST['address'] as $value) { //Add comma and space until last element if (sizeof($_POST['address']) == $counter) { $body .= "$value\n"; break;} else { $body .= "$value, "; $counter += 1; } if (is_array($_POST['city']) ){ $body .= "$key: "; $counter =1; foreach ($_POST['city'] as $value) { //Add comma and space until last element if (sizeof($_POST['city']) == $counter) { $body .= "$value\n"; break;} else { $body .= "$value, "; $counter += 1; } if (is_array($_POST['state']) ){ $body .= "$key: "; $counter =1; foreach ($_POST['state'] as $value) { //Add comma and space until last element if (sizeof($_POST['state']) == $counter) { $body .= "$value\n"; break;} else { $body .= "$value, "; $counter += 1; } if (is_array($_POST['zipcode']) ){ $body .= "$key: "; $counter =1; foreach ($_POST['zipcode'] as $value) { //Add comma and space until last element if (sizeof($_POST['zipcode']) == $counter) { $body .= "$value\n"; break;} else { $body .= "$value, "; $counter += 1; } if (is_array($_POST['email']) ){ $body .= "$key: "; $counter =1; foreach ($_POST['email'] as $value) { //Add comma and space until last element if (sizeof($_POST['email']) == $counter) { $body .= "$value\n"; break;} else { $body .= "$value, "; $counter += 1; } if (is_array($_POST['question/comments']) ){ $body .= "$key: "; $counter =1; foreach ($_POST['questions/comments'] as $value) { //Add comma and space until last element if (sizeof($_POST['questions/comments']) == $counter) { $body .= "$value\n"; break;} else { $body .= "$value, "; $counter += 1; } } } else { $body .= "$key: $value\n"; } } else { $body .= "$key: $value\n"; } } extract($_POST); //removes newlines and returns from $email and $name so they can't smuggle extra email addresses for spammers $email = clear_user_input($email); $name = clear_user_input($name); //Create header that puts email in From box along with name in parentheses and sends bcc to alternate address $from='From: '. $email . "(" . $name . ")" . "\r\n" . 'Bcc: sales@aiemergency.com' . "\r\n"; //Creates intelligible subject line that also shows me where it came from $subject = 'Website Contact Us Info'; //Sends mail to me, with elements created above mail ('sales@aiemergency.com', $subject, $body, $from); ?>