$action = $_POST["action"];
if ($action == "submit") {
$first_name = $_POST["first_name"];
$email = $_POST["email"];
$company = $_POST["company"];
$address = $_POST["address"];
$phone = $_POST["phone"];
$fax = $_POST["fax"];
$description = $_POST["description"];
$influence = $_POST["influence"];
$project = $_POST["project"];
$application = $_POST["application"];
if (!$first_name) {
$error = 1;
$error_message .= "- There seems to be a problem with your first name
";
}
if (!$email) {
$error = 1;
$error_message .= "- There seems to be a problem with your email address
";
}
if (!$company) {
$error = 1;
$error_message .= "- There seems to be a problem with your company
";
}
if (!$address) {
$error = 1;
$error_message .= "- There seems to be a problem with your address
";
}
if (!$phone) {
$error = 1;
$error_message .= "- There seems to be a problem with your phone number
";
}
if (!$fax) {
$error = 1;
$error_message .= "- There seems to be a problem with your fax number
";
}
if (!$description) {
$error = 1;
$error_message .= "- There seems to be a problem with your project description
";
}
if (!$error) {
foreach ($services as $s) {
$all_services .= "$s\n";
}
$youremail="tricia@icekubesystems.com";
$emailsubject="Website - More Info"; // This will the email's subject
$from_who="Ice Kube Systems
";
$pagetitle="Thank You!"; // Title to be displayed on the sent info page.
if (getenv(HTTP_CLIENT_IP)){
$user_ip=getenv(HTTP_CLIENT_IP);
} else {
$user_ip=getenv(REMOTE_ADDR);
}
$mailbody="\n=============================\nCONTACT INFORMATION\n=============================\n";
$mailbody.="Full Name: $first_name\n";
$mailbody.="Email: $email\n";
$mailbody.="Company Name: $company\n";
$mailbody.="Address: $address\n";
$mailbody.="Phone: $phone\n";
$mailbody.="Fax: $fax\n";
$mailbody.="\n=============================\nPROJECT INFORMATION\n=============================\n";
$mailbody.="Application: $application\n";
$mailbody.="Project Type: $project\n";
$mailbody.="Project Influence: $influence\n";
$mailbody.="Additional Information: $description\n";
mail("$youremail", "$emailsubject", "$mailbody", "From: $from_who"); // Send the email.
$customer_mailbody = "Your submission has been received. One of our \n
sales representatives will contact you within the 1 business day to \n
discuss your needs for the project. We look forward with the possiblity \n
of working with you.\n\n
If you have any questions, feel free to contact us toll free at: 1 (877) 338-5823 .\n";
$customer_mailbody = $customer_mailbody . $mailbody;
// mail("$email", "$emailsubject", "$customer_mailbody", "From: $from_who"); // Send the email.
}
} else {
$error = 0;
}
if (!$action || $error ) {
?>
Request Info
Need more information about our products and services? Please fill out the information below and we will get back to you asap!
In order for us to provide you with the most accurate information, we request that you provide us with as much detail as possible.
if ($error) {
echo "ERROR!!! " . $error_message . "";
}
?>
|
} else {
?>
Request Info
Your submission has been received. One of our sales representatives will contact you within the 1 business day to discuss your needs for the project. We look forward with the possiblity of working with you.
|
}
?>