开发者

mysqli line breaks

开发者 https://www.devze.com 2023-03-16 03:48 出处:网络
I am no开发者_开发知识库t understanding how to eliminate the returns and new lines that are showing up in my emails that I am using PHPMailer.

I am no开发者_开发知识库t understanding how to eliminate the returns and new lines that are showing up in my emails that I am using PHPMailer.

I start with mysqli_real_escape_string($link, $_POST['message']);

and then I echo this in the HTML body of the email and it returns something like this:

Hi, This is another testrnrnRandy - Done

What do I need to do so that the return new line actually shows up and the rn does not?

Thank you for your help


Don't use mysqli_real_escape_string, but nl2br.

Use mysqli_real_escape_string only to calculate values that are actually going to be used for constructing SQL queries.

0

精彩评论

暂无评论...
验证码 换一张
取 消