Make and Enquiry Homepage Custom Manufacturing Examples of our Work Catalogues & Enquiries
Phone: 07 5524 2730 Mobile: 0419 753 540 Fax: 07 5524 9964 Send us an Email
Opening Hours 8:00 am - 12:00 pm Monday to Friday (after hours by appointment)
|
$step = $_GET['step'];
function IsInjected($str)
{
$injections = array('(\n+)',
'(\r+)',
'(\t+)',
'(%0A+)',
'(%0D+)',
'(%08+)',
'(%09+)'
);
$inject = join('|', $injections);
$inject = "/$inject/i";
if(preg_match($inject,$str)){
return true;
} else {
return false;
}
}
if($step == 1){
$name = $_POST['name'];
$phone = $_POST['phone'];
$supplier = $_POST['supplier'];
$page = $_POST['page'];
$code = $_POST['code'];
$message = $_POST['message'];
//Validate first
if(empty($name))
{
$response = "There were problems submitting your form. Please correct your name";
$done1 = 1;
} else {
$done1 = 2;
}
if(empty($phone))
{
$response = "There were problems submitting your form. Please correct your phone number";
$done2 = 1;
} else {
$done2 = 2;
}
$email_from = "automated";
$email_subject = "WEBSITE ENQUIRY";
$email_body = "You have received a new message from $name.\n"."Their Phone Number: $phone \n"."Page Number: $page \n"."Product Code: $code \n"."Supplier: $supplier \n"."Here is the message:\n $message \n".
$headers = "From: $email_from \r\n";
$headers .= "Reply-To: $email_from \r\n";
if(($done1 == 2) && ($done2 == 2)){
mail("sales@twintownstrophies.com.au",$email_subject,$email_body,$headers);
$response = " Thank-you for your enquiry";
}
}
?>
if($response != null){
echo $response;
} else {
echo "Fill out the form below and we will get back to you as soon as possible. Be sure to enter in any product names from the catalogues we supply from above.";
}
?>
|
|
|