On Fri, Jun 26, 2009 at 12:27, Adam Williams<awill...@mdah.state.ms.us> wrote:
> I have staff fill out a form that contains a <textarea> with their problem
> description and emailed to me when they click submit. Staff will press
> enter in the text area, but I'm having problems converting the \r\n into a
> new line in the email that is sent to me, here is the code:
[snip!]
In a cursory glance, I've noticed the following code:
htmlspecialchars(nl2br(str_replace('\r','',$_POST["problem"])))
You are using a literal '\r' in your str_replace() function. This
should instead be replaced with double quotes to translate the \r to
its appropriate EOL character:
htmlspecialchars(nl2br(str_replace("\r",'',$_POST["problem"])))
--
</Daniel P. Brown>
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Ask me about our fully-managed servers and proactive management
clusters starting at just $200/mo.!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php