title: php file upload not working - blank page
body: <p>I'm trying to upload a file using php on my local server and after running the script (which is a very simple one) the page that should echo information is just blank. Can someone please help me figure out what the problem is? I've tried reading up on many different posts but I can't seem to find a solution.
  Thanks</p>
  
  <p>html</p>
  
  <pre><code>&lt;form enctype="multipart/form-data" action="upload.php" method="POST"&gt;
  &lt;input type="hidden" name="MAX_FILE_SIZE" value="100000" /&gt;
  Choose a file to upload: &lt;input name="uploadedfile" type="file" /&gt;&lt;br /&gt;
  &lt;input type="submit" value="Upload File" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>php</p>
  
  <pre><code>&lt;?php 
  // Where the file is going to be placed 
  $target_path = "tmp/";
  $target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
  $target_path = "tmp/";
  $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); 
  if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
      echo "The file ".  basename( $_FILES['uploadedfile']['name']). 
      " has been uploaded";
  } else{
      echo "There was an error uploading the file, please try again!";
  }
  ?&gt;
  </code></pre>
  
  <p>I'm not getting anything from this. Just a blank page...and when I check the tmp DIR nothing is in there... any suggestions? I am using XAMP</p>
  
  <p>EDIT:</p>
  
  <p>Turns out it was two parts. #1 DIR permission, and #2 I had to browse to my xampp directory through the DNS for the server. Which is strange because I could usually just go through localhost and it would work fine. I guess the problem was with XAMPP itself.</p>
  
  <p>Thanks for everyone's help!</p>