I have a textarea in a html form. the text is inserted into a mysql db. if there is aready text in the mysql db then I echo the text into the textarea in my php script. but when I echo text into the text area it always appends about an inch of white space to the begining. I've tried everything that I can think of to get rid of this whitespace. I trim() the variable before I insert into mysql, and i even trim() the variable that I pull out of mysql before it is echo'd. i also use nl2br() on the variable before it is echo'd. but the whitespace is still there. this is an example of how i'm echoing the data from mysql into the textarea:
anyone know how I get rid of this whitespace problem? i've tried everything that I can think of.
Mahalo in advance,
Ammon
| Code: |
|
<textarea name="notes" cols="50" rows="3" id="notes"> <?php if ($row['notes']!="") {echo nl2br(trim($row['notes'])); } ?> </textarea> |
anyone know how I get rid of this whitespace problem? i've tried everything that I can think of.
Mahalo in advance,
Ammon
