My code did work few minutes ago. I didn't change anything, I just tried again for tests, now nothing is working. I just wanted to do a very simple form to email :
HTML
<form action="mail.php" method="post" id="inscription">
<input name="nom" type="text" id="nom" placeholder="Nom">
<input name="prenom" type="text" id="prenom" placeholder="Prénom">
<input name="email" type="email" id="email" placeholder="E-mail">
<input name="tel" type="tel" id="tel" placeholder="01.23.45.67.89">
<input name="company" type="text" id="company" placeholder="Nom de l'entreprise">
<input name="nb-personne" type="text" id="nb-personne" placeholder="Nombre de personne">
<textarea name="comment" cols="15" rows="6" id="comment"></textarea>
<input type="submit" name="Submit" value="JE M'INSCRIS*" class="submit">
</form>
PHP
$ToEmail = 'ptusseau@histrasbourg.com';
$EmailSubject = 'Inscription SOIREE BRESILIENNE<hr/>';
$mailheader = "From: ".$_POST["email"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["email"]."\r\n";
$mailheader .="MIME-Version: 1.0\r\n";
$mailheader .="Content-type: text/html; charset=utf=8\r\n";
$MESSAGE_BODY = "Nom: ".$_POST["nom"]."";
$MESSAGE_BODY .= "Prénom: ".$_POST["prenom"]."";
$MESSAGE_BODY .= "Email: ".$_POST["email"]."";
$MESSAGE_BODY .= "Tél: ".$_POST["tel"]."";
$MESSAGE_BODY .= "Entreprise: ".$_POST["company"]."";
$MESSAGE_BODY .= "Nombre de personne: ".$_POST["nb-personne"]."";
$MESSAGE_BODY .= "Commentaire: ".nl2br($_POST["comment"])."";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader);
// METTRE UN MERCI.HTML
include("merci.html");
exit(0);
I wanted to make a simple email, with
in HTML just before any new line (prenom, email, tel, etc.).
But I don't know how to do, I don't understand .nl2br actually ...
And it doesn't send an email anymore, anyway.