hno Posted May 13, 2010 Share Posted May 13, 2010 HI' I'm using ckeditor_3.2.1 as my html editor . It's good and i only have one problem with inserting html codes in the database . For example my html code is this "<span class="a" > hi </span <br /> welcome " , after I have inserting it in the database and retrieve it , it has changed alot and became something like this "<br / > <br /><span class="a" >//////////// hi///////////</span>////////<welcome > <br /> <br /> <br /> <br /> " how can I fix it thanks Link to comment https://forums.phpfreaks.com/topic/201616-problem-with-inserting-html-code-in-the-database/ Share on other sites More sharing options...
freelance84 Posted May 13, 2010 Share Posted May 13, 2010 Yea I've also got a relatively similar problem. When I enter info into mysql after running it through function get_post($var) { return mysql_real_escape_string($_POST[$var]); } Things seem to acquire lots of escaping backslashes before apostrophes...etc . Is this normal? They can simply be removed before placing displaying them on screen using str_replace though. http://php.net/manual/en/function.str-replace.php Link to comment https://forums.phpfreaks.com/topic/201616-problem-with-inserting-html-code-in-the-database/#findComment-1057707 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.