$sent = 0; if(!empty($_POST['email']) && $_POST['secure']=="secure" && strlen($_POST['email'])<=35) { // send comments $text = "The following comments have been sent from your 'Contact Us' form:\n------------------------------\n\n"; $text .= "Name: ".$_POST['name']; $text .= "\nEmail: ".$_POST['email']; $text .= "\nCompany: ".$_POST['company']; $text .= "\nAddress: ".$_POST['address']; $text .= "\nCity: ".$_POST['city']; $text .= "\nState: ".$_POST['state']; $text .= "\nZip: ".$_POST['zip']; $text .= "\nPhone: ".$_POST['phone']; $text .= "\nFax: ".$_POST['fax']; $text .= "\nURL: ".$_POST['web_url']; $text .= "\n\nBest way to contact: ".$_POST['contactme']; $text .= "\n\nLearned about RBR from:\n "; if(is_array($_POST['learn'])) { foreach($_POST['learn'] as $learn) { $text .= $learn . "\n "; } } $text .= "\n\nServices interested in:\n "; if(is_array($_POST['services'])) { foreach($_POST['services'] as $services) { $text .= $services . "\n "; } } $text .= "\n\nComments/Questions: ".$_POST['comments']; $text .= "\n\n------------------------------"; if(!mail("rick@rbrproductions.com", "New Website Feedback", $text, "From: ".$_POST['email']."\r\n")) $sent = 0; else $sent = 1; } ?>
|
||||||||||||||