From a html form a text is stored in a database. With the following code I tried to mail that text to a reciepant:
$recipient = $emailadres;
$subject = 'xxxx';
$header = 'From: xxxx <xxx@xxxxxxxxx.nl>';
if ($aanhef == 'Dhr.') {
$geslacht = 'heer';
}
elseif ($aanhef == 'Mevr.') {
$geslacht = 'mevrouw';
}
else {
$geslacht = 'heer/mevrouw';
}
$mail_body = $bevestiging;
$mail_body = str_replace('#geslacht#', $geslacht, $mail_body);
$mail_body = str_replace('#achternaam#', $achternaam, $mail_body);
mail($recipient, $subject, $mail_body, $header);
in the variable mail_body the content of the mail is stored, after that gender and last name in the content are replaced. This php code works. However, if we looked at the recieved mail all the enters filled in in the HTML form become two enters, in other words the whole layout of the email has changed, when I look into the database the text is there in normal layout, no double enters ect. But if I put in the text manually in the database it works normal. Is it possible that in the database a hidden html layout is stored? Or is it something else