How do i preserve the formatting of a message typed in the textarea of a form?
Normally all of the spaces and lines are removed in the received message to give one continuous line of text.
<textarea name="msg" id="msg" cols="30" rows="10" style="width:320px;"></textarea><br />
Sorry ... I did a search of the forum and found my answer.
All i needed to do, was to encapsulate the returned variable from the form (id=msg) in the nl2br() function.
In my example it was:
$message = trim( nl2br($_POST['msg']) );
well you can preserve line breaks by using [man]nl2br[/man] when they submit