Hi
I am using a text-area in a form to capture data like this:
<textarea rows = 10 cols = 50 name='x_desc_lng' />
<?php echo $N_desc_lng ?></textarea>
I then collect the data with :
N_desc_lng = strip_tags(trim($_POST["x_desc_lng"]));
I used this to protect my website from possible sabatage.
And then I write it to my mysql db.
However I am losing the formating. (the line feeds and extra spaces)
If someone types in:
Hello there
how are you ?
I am feeling good today!
When I get it back from the mysql dbase and display it I get ;
Hello there how are you ? I am feeling good today!
Itried getting rid of the trim and strip_tags by doing this:
$N_desc_lng = $_POST["x_desc_lng"];
but i still get the squashed up version.
Does anyone know how I can keep the format in my text areas ? It must be possible
because this bb is doing it !
many thanks
David