You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
631 B
22 lines
631 B
<?php
|
|
// Check for empty fields
|
|
if(empty($_POST['name']) ||
|
|
empty($_POST['email']) ||
|
|
//empty($_POST['phone']) ||
|
|
empty($_POST['message']) ||
|
|
!filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
|
|
{
|
|
echo "Aucun champ valide !";
|
|
return false;
|
|
}
|
|
|
|
$name = strip_tags(htmlspecialchars($_POST['name']));
|
|
$email_address = strip_tags(htmlspecialchars($_POST['email']));
|
|
//$phone = strip_tags(htmlspecialchars($_POST['phone']));
|
|
$message = strip_tags(htmlspecialchars($_POST['message']));
|
|
|
|
//envoi
|
|
require_once('conf.php');
|
|
mail($to,$email_subject,$email_body,$headers);
|
|
return true;
|
|
?>
|