Hi:
I'm inseting some formatted text into mySQl, for example the string:
<font style="BACKGROUND-COLOR: #ff6666">test</font>
The code for insetion and retrieval works fine, but I need it to be inserted as:
<font style=\"BACKGROUND-COLOR: #ff6666\">test</font>
Basically to add slashes to quotes, etc, because the output uses javascript and that creates problems.
I've treid htmlentities, htmlspecialchars, and addslashes, but no luck, I guess I'm making a simple mistake but just can't see it.
I'm using them like this:
$sql =mysql_query(" UPDATE `pictures` SET `pic_name` = addslashes('$_POST[pic_text]'), `pic_text` = '$_POST[pic_text]' WHERE `pic_id` = '$_POST[pic_id]'");
But that doesn't work the way I need it.
Any ideas?
thanx
Kamy