Basically i'm trying to set something where a user enters some text into a textarea (and they press their enter key to add new lines) and then it takes the value from that text area and mails it out in the message of a new email to a specified contact.
All the mailing functionality works, but I need to be able to automatically add a new line when the user presses enter in the textarea.
Using this to get the info from the previous page/form and replace the \r\n:
$BREAKINGNEWS=$_POST['BREAKINGNEWS'];
$NEWS = str_replace("\r\n","<br />",$BREAKINGNEWS);
Then just adding $NEWS into the code to mail it out.
Doesn't seem to work though, just puts it on 1 line and doesn't replace the \r\n!
Any help is most appreciated :)
Just use the nl2br built in
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With