title: Is FILTER_SANITIZE_STRING enough to avoid SQL injection and XSS attacks?
body: <p>I'm using PHP 5 with <a href="http://www.php.net/manual/en/class.sqlite3.php" rel="noreferrer">SQLite 3 class</a> and I'm wondering if using <a href="http://php.net/manual/en/book.filter.php" rel="noreferrer">PHP built-in data filtering</a> function with the flag FILTER_SANITIZE_STRING is enough to stop SQL injection and XSS attacks.</p>
  
  <p>I know I can go grab a large ugly PHP class to filter everything but I like to keep my code as clean and as short as possible.</p>
  
  <p>Please advise.</p>