At 8:12 AM -0500 1/9/09, Stephen wrote:
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
Stephen:
Just store data in a dB, not data AND html.
Besides, things change. You never know how the client will want the
data displayed.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php