Re: formated mail
I am a little unsure about if you are trying to send the textarea input in an email or display it on a webpage, but line breaks in the textarea box are saved as "\n". If you want the line break in an email you may need to add a "\r", so run your message through str_replace function like this:
<?php
$_POST['message'] = str_replace("\n", "\n\r", $_POST['message']);
?>
If you want to display the message to a webpage then you can use the nl2br function like this:
<?php
echo nl2br($_POST['message']);
?>
Hope this helps.
|