Your Feedback

1 || $result2 > 1 || $result3 > 1 || $result4 > 1) { $spoof = "1"; } if ($referrer == "Please Select" || $customer == "Please Select") { $spoof = "1"; } $stopwords = array("bcc:", "cc:", "CC:", "Bcc:", "BCC:", "BCc:", "BcC:", "Subject:", "subject:", "SUBJECT:", "From:", "from:", "FROM:", "To:", "TO:", "to:", "Content-Type:", "content-type:", "CONTENT-TYPE:"); $fields = array("name", "title", "company", "address", "address2", "city", "zip", "country", "phone", "fax", "email", "comments"); for($a = 0; $a < count($fields); $a++) { $$fields[$a] = str_replace($stopwords, "", $$fields[$a]); } $connection = mysql_connect("localhost","root", "connect"); $db = mysql_select_db("inquiry", $connection); $sql = "SELECT * FROM `mailto` where `co` =\"".$api_co."\""; $sql_result = mysql_query($sql, $connection); $row = mysql_fetch_array($sql_result); $id = $row["id"]; $co = $row["co"]; $website = $row["website"]; $mailto = $row["mailto"]; /* Added to put the customer name in the From field 20100223 RCOLEMAN */ $contact = ($name != "") ? $name : $customer; $mailsubject = $api_co." - Feedback"; $mailheaders = "From: ".$contact." <".$email.">\r\n" . "BCC: webmaster@apigroupinc.us"; $mailbody = " Referrer: $referrer Customer: $customer Name: $name Title: $title Company: $company Address: $address Address Line2: $address2 City: $city State: $state Zip: $zip Country: $country Phone: $phone FAX: $fax E-mail: $email ***************************************************** Comments: $comments"; if ($email != "" && $name != $email && $name != "" && $spoof != "1"){ if(mail($mailto, $mailsubject, $mailbody, $mailheaders)){ $mailto2 = "webmaster@apigroupinc.us"; mail($mailto2, $mailsubject, $mailbody, $mailheaders); $today = date("Y-m-d"); $connection_insert = mysql_connect("localhost","root", "connect") or die("ConnectFailed"); $db_insert = mysql_select_db("inquiry", $connection_insert); $sql_insert = "INSERT INTO `inquiry` (`api_co`, `today`, `referrer`, `customer`, `name`, `title`, `company`, `phone`, `fax`, `address`, `address2`, `city`, `state`, `zip`, `country`, `email`, `comments`) VALUES (\"".$api_co."\",\"".$today."\",\"".$referrer."\",\"".$customer."\",\"".$name."\",\"".$title."\",\"".$company."\",\"".$phone."\",\"".$fax."\",\"".$address."\",\"".$address2."\",\"".$city."\",\"".$state."\",\"".$zip."\",\"".$country."\",\"".$email."\",\"".$comments."\")"; $sql_result_insert = mysql_query($sql_insert, $connection_insert); /* THANK YOU */ $mailsubject = "$api_co"; $mailheaders = "MIME-Version: 1.0\r\n"; $mailheaders .= "Content-type: text/html; charset=iso-8859-1\r\n"; $mailheaders .= "From: inquiry@apigroupinc.us"; $mailbody = "

Dear ".$name.",

Thank you for contacting ".$api_co."

This is an automatic response so please do not reply. We will contact you shortly.


$website

"; mail($email, $mailsubject, $mailbody, $mailheaders); /* END THANK YOU */ } } print("Thank you for your submission, your comments were sent to $api_co Please wait... "); exit(); } include_once '/var/www/html/internet/apigroupinc/contact-us2.php'; js(); ?>
' method='post' onSubmit='return(validator(this))'> ' />

24 Hour Emergency Service

Twin Cities: 763-780-8658 Duluth: 218-628-3323 Hibbing: 218-263-3658

Schedule Service