title: PHP simple file upload
body: <p>I'm doing a simple file upload using the following script:</p>
  
  <pre><code>$errors = '';
  $target_path = "[PATH HERE]";
  
  $target_path = $target_path . basename($_FILES['uploadFile']['name']); 
  
  if(move_uploaded_file($_FILES['uploadFile']['tmp_name'], $target_path)) {
       $errors = "The file ".  basename( $_FILES['uploadFile']['name']). " has been uploaded";
  } else{
       $errors = "There was an error uploading the file, please try again! Type: " . $_FILES['uploadFile']['type'];
      }
  </code></pre>
  
  <p>For some reason, I get an error uploading the file and the file type is not displayed. It seems to only grab the name of the file without the extension (i.e. "test" rather than "test.pdf"). I'm sure it's something simple, but what am I doing wrong?</p>