PHP, receiving POST'd sql in a php script, getting some mysql errors, should I be using addslashes?
<p>In most cases whenan sql update query is posted my php script, it works without problem. However, in some cases I get an error from mysql. I'm using a encryption function to send data over the net, so it arrives as sent.</p>

<p>If I post the same query into phpmyadmin, it always works.</p>

<p>Do I need to add $sql = addslashes($sql); ?</p>

<p>I'm hesitant to use this on all queries as most of the work and I don't want to end up with slashes in my data when it may not be needed.</p>
