Hallo,
ich habe ein paar Probleme damit HTML Code in die Datenbank zu speichern.
Folgender Code müsste so in die DB:
PHP-Code:
<!-- SZM VERSION="1.5" --> <script type="text/javascript"> <!-- var IVW="http://example.ivwbox.de/cgi-bin/ivw/AB/qq_xyz011101;[comment]";
document.write("<img src=\""+IVW+"?r="+escape(document.referrer)+"&d="+(Math.random()*100000)+"\" width=\"1\" height=\"1\" alt=\"szmtag\" />");
//--> </script>
<noscript> <img src="http://example.ivwbox.de/cgi-bin/ivw/AB/qq_xyz011101;[comment]" width="1" height="1" alt="szmtag" /> </noscript> <!-- /SZM -->
Wenn ich htmlspecialchars() verwenden bekomme ich einen SQL Syntax Error.
Ist htmlspecialchars() die falsche Funktion in diesem Fall?!