on 15/01/03 4:24 AM, Foong ([EMAIL PROTECTED]) wrote:

> Hi,
> I wonder which is the better way to store data into database?
> 1. stor the data after we call htmlspecialchars with the data (means we
> store " as &quote; in database)
> 2. stor the data in non encoded form and call htmlspecialchars whenever we
> want to display it.

I'm a firm believer in option 2...store it 'as-is' and adapt it to suit
different environments (HTML, XML, CSV, Email, Wap, whatever)... however,
if, forexample, it was a long article that gets read 1000's of times a day,
and is unlikely ever to be ported into an email, or to other formats, then
it makes perfect sense to get the content right once, and never worry about
it again...

Justin


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

Reply via email to