Accents en php
Résolu/Fermé
gilbertgibert
Messages postés
67
Date d'inscription
mardi 7 octobre 2003
Statut
Membre
Dernière intervention
14 juin 2016
-
22 juil. 2010 à 14:14
gilbertgibert Messages postés 67 Date d'inscription mardi 7 octobre 2003 Statut Membre Dernière intervention 14 juin 2016 - 23 juil. 2010 à 15:38
gilbertgibert Messages postés 67 Date d'inscription mardi 7 octobre 2003 Statut Membre Dernière intervention 14 juin 2016 - 23 juil. 2010 à 15:38
A voir également:
- Accents en php
- Easy php - Télécharger - Divers Web & Internet
- Get_magic_quotes_gpc php 8 ✓ - Forum PHP
- Href php ✓ - Forum PHP
- Bouton php - Forum PHP
- Php accent - Astuces et Solutions
7 réponses
lys44
Messages postés
57
Date d'inscription
mardi 25 mai 2010
Statut
Membre
Dernière intervention
21 mars 2011
5
22 juil. 2010 à 14:16
22 juil. 2010 à 14:16
Bonjour,
As-tu essayé ceci ??? :
$body_top .= "Content-type: text/plain; charset=iso-8859-1\n";
As-tu essayé ceci ??? :
$body_top .= "Content-type: text/plain; charset=iso-8859-1\n";
gilbertgibert
Messages postés
67
Date d'inscription
mardi 7 octobre 2003
Statut
Membre
Dernière intervention
14 juin 2016
22 juil. 2010 à 15:29
22 juil. 2010 à 15:29
Voici mon script:
<!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>Document sans nom</title>
</head>
<body>
<?php
$TO = "mon email@truc.fr";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
?>
<p style="text-align: left;">
<input type="button" name="contact" value="Retour" onclick=window.open("index.html",'_self');
)>
</body>
</html>
<!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>Document sans nom</title>
</head>
<body>
<?php
$TO = "mon email@truc.fr";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
?>
<p style="text-align: left;">
<input type="button" name="contact" value="Retour" onclick=window.open("index.html",'_self');
)>
</body>
</html>
gilbertgibert
Messages postés
67
Date d'inscription
mardi 7 octobre 2003
Statut
Membre
Dernière intervention
14 juin 2016
22 juil. 2010 à 15:36
22 juil. 2010 à 15:36
Voici mon script, je ne vois pas ce que je peux faire
<!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>Document sans nom</title>
</head>
<body>
<?php
$TO = "truc@bidule.fr";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
echo "<P align=left>";
echo "Votre formulaire a bien été envoyé !</P>";
echo "</BODY></HTML>";
?>
</body>
</html>
<!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>Document sans nom</title>
</head>
<body>
<?php
$TO = "truc@bidule.fr";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
echo "<P align=left>";
echo "Votre formulaire a bien été envoyé !</P>";
echo "</BODY></HTML>";
?>
</body>
</html>
lys44
Messages postés
57
Date d'inscription
mardi 25 mai 2010
Statut
Membre
Dernière intervention
21 mars 2011
5
22 juil. 2010 à 15:51
22 juil. 2010 à 15:51
Essaye de changer ton charset
par
<meta http-equiv="Content-Type" content="text/html; charset= iso-8859-1\n"/>
par
<meta http-equiv="Content-Type" content="text/html; charset= iso-8859-1\n"/>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
gilbertgibert
Messages postés
67
Date d'inscription
mardi 7 octobre 2003
Statut
Membre
Dernière intervention
14 juin 2016
22 juil. 2010 à 16:00
22 juil. 2010 à 16:00
J'ai essayé, ça ne marche pas.
lys44
Messages postés
57
Date d'inscription
mardi 25 mai 2010
Statut
Membre
Dernière intervention
21 mars 2011
5
22 juil. 2010 à 16:37
22 juil. 2010 à 16:37
Tu as essayé de mettre des choses dans ce genre? :
$entetes.= "MIME-version: 1.0\n";
$entetes.= "Content-type: multipart/mixed; ";
$entetes.= "boundary=\"Message-Boundary\"\n";
$entetes.= "Content-transfer-encoding: 7BIT\n";
$body_top = "--Message-Boundary\n";
$body_top .= "Content-type: text/plain; charset=iso-8859-1\n";
$body_top .= "Content-transfer-encoding: 7BIT\n";
$body_top .= "Content-description: Mail message body\n\n";
$msg .= "\n\n--Message-Boundary\n";
$msg .= "Content-type: $attach_type; name=\"$attach_name\"\n";
$msg .= "Content-Transfer-Encoding: BASE64\n";
$msg .= "Content-disposition: attachment; filename=\"$attach_name\"\n\n";
$msg .= "$encoded_attach\n";
$msg .= "--Message-Boundary--\n";
$entetes.= "MIME-version: 1.0\n";
$entetes.= "Content-type: multipart/mixed; ";
$entetes.= "boundary=\"Message-Boundary\"\n";
$entetes.= "Content-transfer-encoding: 7BIT\n";
$body_top = "--Message-Boundary\n";
$body_top .= "Content-type: text/plain; charset=iso-8859-1\n";
$body_top .= "Content-transfer-encoding: 7BIT\n";
$body_top .= "Content-description: Mail message body\n\n";
$msg .= "\n\n--Message-Boundary\n";
$msg .= "Content-type: $attach_type; name=\"$attach_name\"\n";
$msg .= "Content-Transfer-Encoding: BASE64\n";
$msg .= "Content-disposition: attachment; filename=\"$attach_name\"\n\n";
$msg .= "$encoded_attach\n";
$msg .= "--Message-Boundary--\n";
gilbertgibert
Messages postés
67
Date d'inscription
mardi 7 octobre 2003
Statut
Membre
Dernière intervention
14 juin 2016
23 juil. 2010 à 15:38
23 juil. 2010 à 15:38
J'ai trouvé la solution.
la page du formulaire doit être en
charset=windows-1252
et là plus de problème, tous les caractères passent correctement.
J'espère que cela pourra servir à d'autres.
la page du formulaire doit être en
charset=windows-1252
et là plus de problème, tous les caractères passent correctement.
J'espère que cela pourra servir à d'autres.