title: Check file uploaded is in csv format
body: <p>I am uploading a file in php and only want to upload it if it's a csv file. I believe my syntax is right for the content type. It always goes to else statement when it's a csv file. What I am doing wrong here?</p>
  
  <pre><code>if (($_FILES["file"]["type"] == "text/csv"))
  {
  
  }
  else
  {
  
  }
  </code></pre>
  
  <p>If I change the content type it works for that format just not csv.</p>