-
html <textarea> problem
<textarea wrap="virtual" name="activity_description" rows="7" cols="70"></textarea>
for example I entered this message in my text area:
"The quick.
Brown fox.
jump"
then i saved it to my database.. when i query and display it back the result would look like this:
"The quick. Brown fox. jump"
it doesn't retain the way the user entered the message, how do i fix this?
my PostgreSQL db column is set to recieve "character varying" and i do "INSERT INTO activity_info (activity_description)
VALUES (?);
stmt.setString(1, bean.getActivity_description());
i'm using java program so this problem is related to java :) and i think it's how my java program handles the message that needs to be fixed.
-
The text in your textarea are plain text and no html, so you must convert linebreaks.
As example :
"\n" -> "<br/>"
Bye
Johannes