How can I disable string escape in $db->insert, I need to insert html in my database, so I don't want any string escape.Any solutions?
+5
A:
You don't want to disable that escaping.
Escaping data doesn't prevent you from inserting anything. In fact, quite the opposite: escaping data enables you to properly insert characters like quote marks that could otherwise confuse the database. More importantly, passing unescaped data directly to a database exposes an enormous security hole, making it trivial for a "hacker" (if we use the term liberally) to gain unrestricted access to your site and to your database.
You're probably confusing SQL escaping (which escapes data for use in SQL queries) with htmlspecialchars(), which escapes data for use on webpages. The two are unrelated.
VoteyDisciple
2009-08-11 15:30:07
solved with html_entities
Uffo
2009-08-11 15:31:44