title: How to insert php variable containing 's in sql statement?
body: <pre><code>$insert = mysql_query("INSERT INTO tblmovie VALUES(' ', '$title', '$genre', '$duration', '$year', '$artists', '$director', '$description', '$name')");
  </code></pre>
  
  <p>This is my sql statement. The only thing wrong is that $title doesn't accept "Assassin's Creed" because it contains an apostrophe(') s resulting in sql syntax error:</p>
  
  <blockquote>
    <p>You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use
    near 's Creed', 'Action', '2:20:21', '2016', 'Michael Fassbender',
    'Justin Kurzel', 'C' at line 1</p>
  </blockquote>
  
  <p>How do I fix this?</p>