hello,
i have a contact form with an input (multi line text box), when i merely pass the raw input into the email body i receive it fine; carriage returns in particular work ("\r\n) and so a multi lined input message appears multi lined in the email.
but, when i filter the input through strip_tags and then mysql_real_escape_string the email opens with the "\r\n" bits visible and the message all on one line.
what is it about strip_tags or mysql_real_escape_string that causes the "\r\n" to not work, even though they are there?
thanks
simple input formatting questions
Moderator: General Moderators
-
alfredwong
- Forum Newbie
- Posts: 3
- Joined: Fri Aug 29, 2008 4:37 pm
Re: simple input formatting questions
i think strip_tags do that.
i use another one too:
$order = array("\r\n", "\r", "\n");
$answer_text = str_replace($order, " ", $answer);
This will take off the '\r' and '\n'.
Don't know is it what you need.
But hope this will help
i use another one too:
$order = array("\r\n", "\r", "\n");
$answer_text = str_replace($order, " ", $answer);
This will take off the '\r' and '\n'.
Don't know is it what you need.
But hope this will help