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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
<meta http-equiv="Content-Type" content="text-html; charset=iso-8859-1">
<?PHP
$secteur = $_POST['secteur']; // secteur ...
$nom = addslashes($_POST['nom']); // Nom ...
$responsable = addslashes($_POST['responsable']); // Nom ...
$addr = addslashes($_POST['addr']); // Nom ...
$ville = addslashes($_POST['ville']); // Nom ...
$cp = addslashes($_POST['cp']); // Nom ...
$state = addslashes($_POST['state']); // Nom ...
$tel = addslashes($_POST['tel']); // Nom ...
$fax = addslashes($_POST['fax']); // Nom ...
$mail = addslashes($_POST['mail']); // Nom ...
$passwd2 = addslashes($_POST['passwd2']); // Nom ...
$comments = addslashes($_POST['comments']); // Nom ...
$country = addslashes($_POST['country']); // Nom ...
if (!empty($_POST['nom'])&& !empty($_POST['responsable'])&&!empty($_POST['addr'])&&!empty($_POST['ville'])&&!empty($_POST['cp'])&&!empty($_POST['tel'])&&!empty($_POST['fax'])&&!empty($_POST['mail'])&&!empty($_POST['passwd2'])&&!empty($_POST['comments']))
{
//envoi mail
$mon_email="halima.chegdari@gmail.fr,h.serbouti@gmail.fr";
$object="saisie Mr(mme):".$nom."";
$mon_pseudo="Hicham SERBOUTI";
$corps="<strong>Secteur:</strong> <font color='#FF0000'>".$secteur."</font><br/>";
$corps.="<strong>Nom:</strong> <font color='#FF0000'>".$nom."</font><br/>";
$corps.="<strong>Responsable:</strong> <font color='#FF0000'>".$responsable."</font><br/>";
$corps.="<strong>Adresse:</strong> <font color='#FF0000'>".$addr."</font><br/>";
$corps.="<strong>Country:</strong> <font color='#FF0000'>".$country."</font><br/>";
$corps.="<strong>Ville:</strong> <font color='#FF0000'>".$ville."</font><br/>";
$corps.="<strong>Code Postal:</strong> <font color='#FF0000'>".$cp."</font><br/>";
$corps.="<strong>State:</strong> <font color='#FF0000'>".$state."</font><br/>";
$corps.="<strong>Telephone:</strong> <font color='#FF0000'>".$tel."</font><br/>";
$corps.="<strong>Fax:</strong> <font color='#FF0000'>".$fax."</font><br/>";
$corps.="<strong>Email:</strong> <font color='#FF0000'>".$mail."</font><br/>";
$corps.="<strong>PassWord:</strong> <font color='#FF0000'>".$passwd2."</font><br/>";
$corps.="<strong>Commentaire:</strong> <font color='#FF0000'>".$comments."</font><br/>";
$entete = 'MIME-Version: 1.0' . "\n";
$entete .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
$entete .= 'From: h.serbouti@gmail.com' . "\n"; # IMPORTANT l\'adresse spécifiée ici est sur le domaine SMTP qui Envoie
if(mail($mon_email,$object,$corps,$entete)) //envoi mail
{
echo'envoi avec sucee';
}
else
{
echo'echec envoi formulaire';
}
echo'<meta http-equiv="refresh" content="3;onclick="ajax('formulaire.html', 'corps')" />';
} |
Partager