Some records update, some don't
Posted: Thu Mar 17, 2011 5:52 pm
I am working with a table that came from a previous project. I have a cms for the client to edit text areas formated using TinyMCE. If I create new records, they are fine and I can retrieve them and edit them, but some of the original records will not update to the MySQL database, and I can't figure out the pattern. I originally ran the posted data through mysql_real_escape_string, then added htmlentities to see if that would help get MySQL to accept the data.
Any ideas?
Code: Select all
foreach ($_POST as $k=>$v){
$v = htmlentities($v, ENT_QUOTES, "UTF-8");
$v = mysql_real_escape_string($v);
}