View Single Post
Old 09-06-2008, 08:54 PM   #4 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Run the HTML string through mysql_real_escape_string() to prevent the HTML causing problems with the SQL query syntax (and for a basic, much needed security boost) if you're not already.

Do not transform the data (i.e. using htmlspecialchars, etc.) where it's not necessary. That's a basic rule of thumb and an important one to learn.
Salathe is offline  
Reply With Quote