title: When to use filter_input()
body: <p><em>This question was originally asked in a comment <a href="https://stackoverflow.com/questions/768442/php-filter-input#comment-580014">here</a>.</em></p>
  
  <p>Is <a href="http://www.php.net/manual/en/function.filter-input.php" rel="noreferrer">filter_input()</a> still necessary if you’re using parameterized queries and <a href="http://php.net/manual/en/function.htmlspecialchars.php" rel="noreferrer">htmlspecialchars()</a> before you print any user-supplied data?</p>
  
  <p>It seems unnecessary to me, but I've always been told to "Filter Input, Escape Output". So, aside from a database (or another form of storage), is there any need to filter inputted data? </p>