1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| <?php
if(isset($_POST ['submit'])){
$name = htmlspecialchars($_POST ['name']);
$name = trim($_POST ['name']);
$name = stripslashes($_POST ['name']);
$name = strip_tags($_POST ['name']);
$subject = trim( $_POST ['subject']);
$subject = htmlspecialchars( $_POST ['subject']);
$subject = stripslashes( $_POST ['subject']);
$subject = strip_tags( $_POST ['subject']);
$mailFrom = htmlspecialchars ($_POST ['mail']);
$mailFrom = htmlspecialchars ($_POST ['mail']);
$mailFrom = stripslashes ($_POST ['mail']);
$mailFrom = strip_tags ($_POST ['mail']);
$message = htmlspecialchars($_POST ['message']);
$message = trim($_POST ['message']);
$message = stripslashes($_POST ['message']);
$message = strip_tags($_POST ['message']);
$mailTo = "contact@mawsua.com";
$hearders = "From:".$mailFrom;
$txt= "you have received an mail from ". $name."\n\n".$message;
mail($mailTo, $subject, $txt, $hearders);
header ("Location:4_contactes.php?mailsended");
}
?> |
Partager