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 50 51 52 53 54 55 56 57 58 59 60 61 62
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/plain; charset=UTF-8" />
</head>
<?PHP
if (get_magic_quotes_gpc())
{
$nom = stripslashes($_POST['nom']);
$email = stripslashes($_POST['email']);
$nation = stripslashes($_POST['nation']);
$prenom = stripslashes($_POST['prenom']);
$telephone = stripslashes($_POST['telephone']);
$adresse = stripslashes($_POST['adresse']);
$profession = stripslashes($_POST['profession']);
$statut = stripslashes($_POST['statut']);
$interet = stripslashes($_POST['interet']);
$message = stripslashes($_POST['message']);
}
else
{
extract($_POST,EXTR_OVERWRITE);
$to = 'adresse@email.com';
// Subject
$subject = 'Demande informations concernant monsite.com';
/////voici la version Mine
$headers = "MIME-Version: 1.0\r\n";
$headers .='Content-Type: text/plain; charset="utf-8"'." ";
$headers .='Content-Transfer-Encoding: 8bit';
/* Construction du message */
$msg = 'Bonjour,'."\r\n\r\n";
$msg .= 'Ce mail a été envoyé depuis le site monsite.com par '.$nom.' '.$prenom."\r\n\r\n";
$msg .= 'Voici le message qui vous est adressée :'."\r\n";
$msg .= '***************************'."\r\n";
$msg .= 'Le nom est :'.$nom."\r\n\r\n";
$msg .= 'Le prénom est :'.$prenom."\r\n\r\n";
$msg .= 'La nationalité est :'.$nation."\r\n\r\n";
$msg .= 'Le numéro de téléphone est :'.$telephone."\r\n\r\n";
$msg .= 'L adresse email est :'.$email."\r\n\r\n";
$msg .= 'L adresse de domiciliation est :'.$adresse."\r\n\r\n";
$msg .= 'Sa profession est :'.$profession."\r\n\r\n";
$msg .= 'Son statut est :'.$statut."\r\n\r\n";
$msg .= 'Son intérêt est :'.$interet."\r\n\r\n";
$msg .= 'Son message est :'.$message."\r\n\r\n";
$msg .= '***************************'."\r\n\r\n";
$headers = 'From: '.$nom.' '.$prenom.' <'.$expediteur.'>'."\r\n\r\n";
/* Envoi de l'e-mail */
mail($to, $subject, utf8_decode($msg), utf8_decode ($headers));
// la fonction de redirection ------------
function redir($url){
echo "<script language=\"javascript\">";
echo "window.location='$url';";
echo "</script>";
}
// Utiliser la redirection ---------------
redir("http://www.monsite.com");
}?>
</html> |
Partager