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 63 64 65 66 67 68 69 70 71 72
| <!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Vous allez bientot etre redirigé</title>
</head>
<body style="color: #FFFFFF; background-color: #000000">
<?php
$nom=$HTTP_POST_VARS['nom'];
$mail=$HTTP_POST_VARS['mail'];
$objet=$HTTP_POST_VARS['objet'];
$message=$HTTP_POST_VARS['message'];
/////voici la version Mine
$headers = "MIME-Version: 1.0\r\n";
//////ici on détermine le mail en format text
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
////ici on détermine l'expediteur et l'adresse de réponse
$headers .= "From: $nom <$mail>\r\nReply-to : $nom <$mail>\nX-Mailer:PHP";
$subject="$objet";
$destinataire="perraudvincent29@yahoo.fr"; //remplacez "perraudvincent29@yahoo.fr" par votre adresse e-mail
$body="$message";
if (mail($destinataire,$subject,$body,$headers)) {
echo "Votre mail a été envoyé<br>";
} else {
echo "Une erreur s'est produite";
}
?></p>
<p align="center">Vous allez bientot etre redirigé vers la page d'acceuil<br>
Si vous n'etes pas redirigé au bout de 5 secondes cliquez <a href="index.html">ici
</a></p></body>
</html>
et le formulaire qui est dans la page contact.htm:
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0" class="style78">
<form action="envoi.php" method="post" enctype="application/x-www-form-urlencoded" name="formulaire">
<tr>
<td colspan="3" class="style80"><strong>Envoyer un message</strong></td>
</tr>
<tr>
<td class="style80" style="width: 21%; height: 24px;">
<div class="style81" style="width: 114px"><strong>Votre nom :</strong></div></td>
<td colspan="2" class="style80" style="height: 24px"><strong><input type="text" name="nom" size="45" maxlength="100"></strong></td>
</tr>
<tr>
<td class="style80" style="width: 21%"><div class="style81"><strong>Votre mail :</strong></div></td>
<td colspan="2" class="style80"><strong><input type="text" name="mail" size="45" maxlength="100"></strong></td>
</tr>
<tr>
<td class="style80" style="width: 21%"><div class="style81"><strong>Sujet : </strong> </div></td>
<td colspan="2" class="style80"><strong><input type="text" name="objet" size="45" maxlength="120"></strong></td>
</tr>
<tr>
<td class="style80" style="width: 21%"><div class="style81"><strong>Message : </strong> </div></td>
<td colspan="2" class="style79"><strong><textarea name="message" cols="50" rows="10"></textarea></strong></td>
</tr>
<tr>
<td class="style80" style="width: 21%"></td>
<td class="style80" style="width: 83%"><center>
<input type="reset" name="Submit1" value="Réinitialiser le formulaire"><span class="style25">
</span>
</center></td>
<td width="41%" class="style80"><center>
<input type="submit" name="Submit" value="Envoyer"><span class="style25"> </span>
</center></td> |
Partager