if($_POST['contact']=='send' and $_POST['nom'] and $_POST['message']){
////send email ////
$name = $_POST['nom'];
$email= $_POST['email'];
$message= $_POST['message'];
$tel= $_POST['tel'];
$to = 'contact@wfitness.ma';
$subject = $_POST['sujet']." - Contact";
$txt ="Nom : ". $name . "\r\n Email : " . $email . "\r\n Tel :" . $tel ."\r\n Message :" . $message;
$headers = "From: noreply@wfitness.ma" . "\r\n" .
"CC: mysqlwebsite@gmail.com";
if($name!=NULL){
if(mail($to,$subject,$txt,$headers)){
?>
}else{
?>
}
}
}
?>