Bonjour,
Lors de la réception des réponses du formulaire, les caractères spéciaux ne s'affichent pas correctement. Comment faire?
Dans le fichier html :
<FORM method=POST action=contact.php target="_self"><table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td > <input type=hidden name=subject value=contact>
Nom et prénom <br />
<INPUT NAME="Nom" TYPE="text" SIZE="30"><br />
Entreprise <br />
<INPUT NAME="Societe" TYPE="text" SIZE="30"><br />
E-mail <br />
<INPUT NAME="<Email" TYPE="text" SIZE="30"><br />
Objet <br />
<INPUT NAME="Objet" TYPE="text" SIZE="30"><br />
Message<br />
<TEXTAREA NAME="Comments" COLS="50" ROWS="9">
</TEXTAREA><br /><br />
<INPUT TYPE="SUBMIT" VALUE="Envoyer"> </td>
</tr>
</table>
</FORM>
dans le fichier php :
<?php
$TO = "mail@orange.fr";
$subject = "Prise de contact du site";
$h = "From: " . $TO;
$message = "Du site internet :";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail
($TO,
$subject,
$message,
$h);
header("Location:accuse.html");
?>
Merci d'avance !
Lors de la réception des réponses du formulaire, les caractères spéciaux ne s'affichent pas correctement. Comment faire?
Dans le fichier html :
<FORM method=POST action=contact.php target="_self"><table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td > <input type=hidden name=subject value=contact>
Nom et prénom <br />
<INPUT NAME="Nom" TYPE="text" SIZE="30"><br />
Entreprise <br />
<INPUT NAME="Societe" TYPE="text" SIZE="30"><br />
E-mail <br />
<INPUT NAME="<Email" TYPE="text" SIZE="30"><br />
Objet <br />
<INPUT NAME="Objet" TYPE="text" SIZE="30"><br />
Message<br />
<TEXTAREA NAME="Comments" COLS="50" ROWS="9">
</TEXTAREA><br /><br />
<INPUT TYPE="SUBMIT" VALUE="Envoyer"> </td>
</tr>
</table>
</FORM>
dans le fichier php :
<?php
$TO = "mail@orange.fr";
$subject = "Prise de contact du site";
$h = "From: " . $TO;
$message = "Du site internet :";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
($TO,
$subject,
$message,
$h);
header("Location:accuse.html");
?>
Merci d'avance !