title: Uploading a filename to mysql database
body: <p>I am trying to upload a file name selected through a form with a 'browse' button on the previous page. The code to do this: </p>
  
  <pre><code>$filename = $_FILES['userfile']['name']; // Get the name of the file (including file extension).
  
  //inserting data order
  $clip = "INSERT INTO musicdb
              (clipID, clipName, genre)
              VALUES
              ('','$filename','$name1')";
  </code></pre>
  
  <p>This works fine when trying to upload a file with no apostrophes in, however when trying to upload a file with an apostrophe <strong>e.g "friends' birthday"</strong> then it fails to upload to the mysql table. I think it's to do with the usage of " and ' interchangeably in the INSERT statement. I don't know which brackets <code>$filename = $_FILES['userfile']['name']</code> uses by default whether its " or '. </p>
  
  <p>Thanks in advance</p>