?: In forms, when data is inserted to a DB from it, how do you preserve the breaks and paragraphs in the forms, rather then when they just come together ignoring when the return/enter key was pressed?
You could try using nl2br()
Any other ways?, It doesn't seem to work for displaying things from the DB.
Well, what did you try to do?
I did nl2br($var) when inserting into the db and displaying from it.
I would suggest that you use that function when you output from the DB only.
nah, still doesn't work... http://trickznstuff.net/staredit2/
A simple example would be:
<?php //entering into DB $text = htmlspecialchars($_POST['text']); mysql_query("INSERT INTO tablename (id, mytext) VALUES(NULL, '$text')"); //retrieving from DB //assuming the text is stored in $text echo nl2br($text); ?>
Thanks a lot