$submit=$_POST['Submit'];
if($submit == Submit){
$status = "OK";
$email=$_POST['email'];
$message=$_POST['message'];
$subject=$_POST['subject'];
$name=$_POST['name'];
$company=$_POST['company'];
$msg="";
$msgerror="";
//error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR);
if ( strlen($name) < 1 ){
$msgerror=$msgerror."* your name field is missing
";
$status= "NOTOK";}
if ( strlen($message) < 5 ){
$msgerror=$msgerror."* your Message field is blank must be more than 5 words
";
$status= "NOTOK";}
if (!stristr($email,"@") OR !stristr($email,".")) {
$msgerror=$msgerror."* your email address is not correct
";
$status= "NOTOK";}
if($status=="OK"){// echo $query;
$headers="";
$headers4="info@cocoin.net"; // Change this address within quotes to your address //
$headers.="Reply-to: $headers4\n";
$headers .= "From: $headers4\n";
$headers .= "Errors-to: $headers4\n";
$headers = "Content-Type: text/html; charset=iso-8859-1\n".$headers;
mail($headers4,$subject,"Contactus
Name :$name
Email:$email
Company:$company
Message: $message","$headers");
$msg="Thank you! your message has been sent we will contact you soon.";
}
}
?>
Para cualquier información, duda o sugerencia puedes ponerte en contacto a través del siguiente formulario. Los campos marcados con asterisco (*) son necesarios. Grácias.
echo $msg; ?>