php code
Posté : 20 juil. 2011, 19:36
Salut
j'ai besoin que quelqu'un m'aide a déboguer ce code le but étant de garder un formatage du text area dans le mail et que cela n'affiche pas de </br> ou autre/
merci a tous
j'ai besoin que quelqu'un m'aide a déboguer ce code le but étant de garder un formatage du text area dans le mail et que cela n'affiche pas de </br> ou autre/
merci a tous
<?php
//Récupération des valeurs des champs du formulaire
$destinataire = "/";
$objet = ucfirst($_POST['objet']);
$courriel = ucfirst($_POST['nom']) . " " . ucfirst($_POST['prenom']) . "<" . $_POST['email'] . ">";
$texte = "Expéditeur\n";
$texte .= "==========\n";
$texte .= "Civilité : " . ucfirst($_POST['civilite']) . "\n";
$texte .= "Nom : " . ucfirst($_POST['nom']) . "\n";
$texte .= "Prénom : " . ucfirst($_POST['prenom']) . "\n";
$texte .= "==========\n";
$texte .= "Email : " . ucfirst($_POST['email']) . "\n";
$texte .= "Téléphone : " . ucfirst($_POST['telephone']) . "\n";
$texte .= "=======\n";
$texte .= "Objet: " . ucfirst($_POST['objet']) . "\n";
$texte .= "Message: " . ucfirst($_POST['descriptif']) . "\n";
$string2=nl2br(htmlentities(stripslashes($string1)));
$texte .= ucfirst($_POST['texte']);
//Expédition du courriel
mail($destinataire, $objet, $texte, "From: " . $courriel .
"\nReply-To:" . $_POST['courriel']);
//Redirection vers la page de confirmation
header("Location: ../confirmation.html");
?>