 <p>The following should work:</p> <pre><code>if (get_magic_quotes_gpc()) { $content = stripslashes($content); } $content = mysql_real_escape_string($content); </code></pre> <p>If your column is utf8, you shouldn't have problems with special characters. Once you've formatted the content correctly, you can feed it to mysql using your standard insert methods.</p>