Re: htmlspecialchars
| From: | Jason Wong | Date: | Tue, 14 Jan 2003 18:09:05 +0000 |
| Subject: | Re: htmlspecialchars | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131595@lists.php.net to get a copy of this message | ||
On Wednesday 15 January 2003 01:24, Foong wrote:
> 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 "e; in database)
> 2. stor the data in non encoded form and call htmlspecialchars whenever we
> want to display it.
It mostly depends on what you do with the data. For example:
If you only store the data once (and never re-edit it) then use (1).
If the data is used for other purposes as well (like gets sent in an email)
then use (2).
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
I wouldn't be so paranoid if you weren't all out to get me!!
*/