We are glad to answer any enquiries that you might have regarding Kids R Us or the Kidshaper Conference. Feel free to contact us on 1300 786 596, or by filling in the form below.
\n";
return mail($toaddress, $subject, $message, $headers);
//return true;
}
$email_to = "info@kidshaperaus.com";
$msg_body = "The following information was submitted through the Kidshaper website:\n\n";
if (isset($_POST['submit']))
{
if ($_POST['submit'] == "Submit")
{
foreach ($_POST as $key => $value)
{
if ($key == "company name" || $key =="contact name" || $key =="phone number" || $key == "request" || $key == "email")
{
if ($value == "")
{
die( "" . str_replace("_", " ", strtoupper($key)) . " was not provided Please click back and try again.\n");
}
if ($key == "email")
{
if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $value))
{
die( "Email address is in wrong format. Please click back and try again.\n");
}
$email_from = $value;
}
else if ($key == "phone number")
{
$spaceless_value = str_replace(" ", "", $value);
if (!eregi("^0[2348]{1}[0-9]{8}", $spaceless_value))
{
die( "The phone number is in the wrong format. Please click back and try again.\n");
}
}
}
if ($key != "submit") {
$msg_body .= $key . ":\t" . $value . "\n";
}
}
echo "" . $msg_body . " ";
if (SendMail("Kidshaper website query", $email_from, "kidshaper.com.au", $email_to, "Query from the Kidshaper website", $msg_body))
{
SendMail("Kidshaper website query", $email_from, "kidshaper.com.au", $email_from, "Message Received", "Hi,\n\nWe have received your request.\nWe will be in contact with you shortly.\n\nRegards,\nKidshaper");
echo "";
} else {
die( "An error occured. Please try again later.\n");
}
}
}
?>
|