title: Possible Reasons Why a PHP File Upload Wouldn't Work
body: <p>Here is the HTML:</p>
  
  <pre><code>&lt;h1&gt;Upload Custom Logo&lt;/h1&gt;
  &lt;form action="settings.php" enctype="multipart/form-data" method="post"&gt;
  &lt;input type="file" name="Logo" /&gt;
  &lt;input type="submit" value="Upload" name="logoUpload" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Here is the PHP:</p>
  
  <pre><code>&lt;?php /* Handle Logo Upload */
  if($_POST['logoUpload']) {
  
  $target_path = "uploads/";
  $Logo = $_FILES['Logo']['name'];
  
  $target_path = $target_path . basename( $_FILES['Logo']['name']); 
  
  if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
      echo '&lt;div class="statusUpdate"&gt;The file '.  basename( $_FILES['Logo']['name']). 
          ' has been uploaded&lt;/div&gt;';
      }   
  
  } else{
      echo '&lt;div class="statusUpdate"&gt;There was an error uploading the file to: '.$target_path.', please try again!  Error Code was: '.$_FILES['Logo']['error'].'&lt;/div&gt;';
  }
  
  }
  ?&gt;
  </code></pre>
  
  <p>It always goes to the "else" statement on that code, I have an uploads folder in the same directory as this php file set to 777 file permissions.  The image I am test uploading is under 10KB in size.  But the move_uploaded_file() always fails and it doesn't return any error message except for the custom error message made with the else statement.</p>