Contact Us
";
if(!$_POST['fullname']) {
echo "- Please enter your Name.
";
$_POST['status']="";
}
if(!$_POST['message']) {
echo "- Please enter your Message.
";
$_POST['status']="";
}
if(!$_POST['email']) {
echo "- Please enter your Email.
";
$_POST['status']="";
}
$split_email = explode("@",$_POST['email']);
if(count($split_email) > 2) {
echo "- Please check your Email. You may only enter one Email address.
";
$_POST['status']="";
}
echo "
";
if($_POST['status'] == "check") {
$body = "Name: {$_POST['fullname']}\nEmail: {$_POST['email']}\n";
if($_POST['phone']) {
$body.="Phone: {$_POST['phone']}\n";
}
$body.="\n{$_POST['message']}\n";
$sendto = "info@cafexinca.com";
$subject = "A Message from the Cafe Xinca.com website";
mail($sendto, $subject, $body, "From: {$_POST['fullname']} <{$_POST['email']}>");
echo "Message Sent!
Your message was successfully sent.
Please allow a maximum of 24 hours for a response from one of our representatives.
";
}
}
if (!$_POST['status']) {
echo "
";
}
include("../footer.php");
?>