C
cooldaddy
I've got a problem with a form's textarea. My script reads out the form
paramaters, and stores the content of the textarea into a string named
$line; To make sure all \n's in the string are replaced by <br> I use:
$line =~ s/\n/<br>/gs; Then I store this into a database.
In an other script I retreive these values and print them out.
It prints ok, however.. if the text in the textarea is wrapped (if the
user types all the way to the end of the textarea, and it continues
automaticly at the next line), the output to the screen is a lot
different then what was put in. How can I make it so that the output
looks the same way as the input ?
paramaters, and stores the content of the textarea into a string named
$line; To make sure all \n's in the string are replaced by <br> I use:
$line =~ s/\n/<br>/gs; Then I store this into a database.
In an other script I retreive these values and print them out.
It prints ok, however.. if the text in the textarea is wrapped (if the
user types all the way to the end of the textarea, and it continues
automaticly at the next line), the output to the screen is a lot
different then what was put in. How can I make it so that the output
looks the same way as the input ?