// DISTRIBUTION INQUIRY FORM [START] if (isset($_POST['btn_send'])) { include 'initialize.php'; if($_POST["g-recaptcha-response"] == '') { $warning .= "Prove that you are not a robot. \\n";} else { $captcha = $_POST["g-recaptcha-response"]; } if($_POST['name'] == '' || $_POST['name'] == 'Full Name') { $warning .= "Please enter your name \\n";} else { $name = $_POST['name']; } if($_POST['phone'] == '' || $_POST['phone'] == 'Contact No') { $warning .= "Please enter your contact number \\n";} else { $phone = $_POST['phone']; } if ($_POST['email'] =='' || $_POST['email'] == 'Email') { $warning .= "please enter your email address \\n"; } else { if (!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", stripslashes(trim($_POST['email'])))) { $warning .= "Please enter a valid email address \\n"; } else { $email = $_POST['email']; } } $company = $_POST['company']; if($_POST['product'] == '') { $warning .= "Please select product \\n";} else { $product = $_POST['product']; } if($_POST['message'] == '' || $_POST['message'] == 'Message') { $warning .= "Please enter your message \\n";} else { $message = $_POST['message']; } $result = mysql_query("SELECT title FROM products WHERE id = {$product}"); if ($result == TRUE) { while ($product_name = mysql_fetch_assoc($result)){ $chosen_product = $product_name['title']; } } if($warning == '') { // $name = mysql_prep($name); // $phone = mysql_prep($phone); // $email = mysql_prep($email); // $company = mysql_prep($company); // $message = mysql_prep($message); // $subject = "Online Inquiry From Prebiotech"; // $inquiry = mysql_prep($inquiry); $result = mysql_query("INSERT INTO inquiries ( name, type_id, website_id, telephone, company, email, inquiry, create_date, ip_address ) VALUES ( '{$name}', '2', '1', '{$phone}', '{$company}', '{$email}', '{$message}', NOW(), '".$_SERVER['REMOTE_ADDR']."' )"); if (!$result) { $mysql_error = stripslashes(mysql_error()); $warning .= "Update failed, please contact technical support \\n"; } else { if (SERVER_STATUS == 1) // If Live Send Email { ////////////////////////////////////////////////// // MAIL [START] $to = DEFAULT_EMAIL; $subject = "Online Distribution Inquiry From Prebiotech"; $message=" New distribution inquiry from your website: Name : {$name} Contact No : {$phone} Email : {$email} Product: {$product} Company : {$company} Product: {$chosen_product} Message : {$message} This is a system generated e-mail message. You Should not reply to this email. Please compose a new email addressed to {$email} ({$name})."; $headers = "From:" . $email; $mail = mail($to, $subject, $message, $headers); // MAIL [END] ////////////////////////////////////////////////// } ?>
Envision leadership in the Pharmateutical & Animal Healthcare Markets, through advanced product innovation and strategic alliance
Distribution & Partnership
Kindly fill-out all required fields.
' . $key.': '.$value.'
'; } // if submitted check response #if (isset($_POST["g-recaptcha-response"])) { if (isset($_POST["g-recaptcha-response"])) { $response = $reCaptcha->verifyResponse( $_SERVER["REMOTE_ADDR"], $_POST["g-recaptcha-response"] ); if ($response != null && $response->success) { echo '