title: What are the best PHP input sanitizing functions?
body: <p>I am trying to come up with a function that I can pass all my strings through to sanitize. So that the string that comes out of it will be safe for database insertion. But there are so many <strong>filtering functions</strong> out there I am not sure which ones I should use/need. </p>
  
  <p>Please help me fill in the blanks:</p>
  
  <pre><code>function filterThis($string) {
      $string = mysql_real_escape_string($string);
      $string = htmlentities($string);
      etc...
      return $string;
  }
  </code></pre>