making data safe - comparison of methods
<p>Regarding processing user input I have seen multiple methods.</p>

<ol>
<li>lpmj.net(a book and site) uses 3 or 4 text processing functions to do this.</li>
<li>mysqli_real_escape_string() - supposedly escapes harmful queries and is database dependent?</li>
<li>mysqli prepared statements - difficult to implement with a single entry point.</li>
<li>PDO prepared statements.</li>
</ol>

<p>Can anyone relate these too each other and how to pick and choose.  I've eliminated 3.) as I find the implementation too involved.  I've eliminated 1.) as it seems like a hack.  </p>

<p>That leaves 2.) and 4.).  Should I use them both or just one or the other.  Like this.  Multiple Choice question.</p>

<p>a.) 2</p>

<p>b.) 4</p>

<p>c.) 2,4</p>
