hi, im trying to preserve the line breaks in a textarea, the problem arises when echoing the post back into the text area during the validation section of the script. i know that the line breaks are still there as when i do nl2br, the <br/> tags show in the text area. basicly when the page reloads all the text goes on one line but obviously i want to display the text with the line breaks active.
the code im using is
[code=php]<p> <label for=”body”>Message</label><textarea name=”body” id=”body” rows=”15″ style=”width : 320px;”><?php if(isset($_POST[‘body’])) echo $_POST[‘body’];?></textarea></p>
this displays the text on one line. if i use nl2br as such
[code=php]<p> <label for=”body”>Message</label><textarea name=”body” id=”body” rows=”15″ style=”width : 320px;”><?php if(isset($_POST[‘body’])) echo nl2br($_POST[‘body’]);?></textarea></p>
the text still displays on one line but with the <br/> tags in.
please help