Hi, is the best way to store data in a mysql database in the text it was submitted, or in HTML format ... changing all the \r's and things to <br>
Depends what you're going to be doing with it. If you know it's only going to go back out to web pages, then it'd make sense to do conversions only once instead of each time it's viewed. If this text can be put into text emails, then you don't want it converted.
I prefer to run htmlentities() before saving it in the database, but not nl2br(). htmlentities() helps when you place the data back into form input elements.
-- ---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php