I have a form to accept free text in a textarea field. The entry is stored in a database.

If the user enters:

abc
def
ghi

I want it to finally display like that.

If they enter

abc

def

ghi

I want it to display with the line gaps.

I use CSS so in the first case I would store as <p>abc<br />def<br />ghi</p>

In the second <p>abc</p><p>def<p></p>ghi</p>

I also have an edit form, that takes the data out of the database, and allows the user to change it, then update the database.

Preparing the existing data before an edit is proving difficult. I have to strip the html and make it format properly in the form.

Then put back html before saving again. I keep ending up with stray characters

Has anyone done this? Is there a tutorial on the web somewhere?

Thanks
Stephen



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to