\r\n\r\n Strings Getting Into Plain Text
I am facing an issue of using form input that I need to send as a text email and then put into the database.
When I send it as a text email, the newline characters show up as \r\n\r\n in the plain text email, but do not show up like that when stored in the DB.
I am using PHP/MySQL - what 开发者_JAVA技巧would be the fix to stop the \r\n\r\n characters from showing up in the email that gets sent out?
Thank you, Alex
send the email as text/html and use
<p> or <br>
tags
A possible cause of this might be database sanitizing (like mysqli_real_escape_string). I've done the same mistake by systematically sanitizing even variables that were never passed to the database.
精彩评论