title: PHP File Upload Failing
body: <p>For some reason my PDF upload form is failing consistently, I have this code:</p>
  
  <pre><code>&lt;?php
  if($_POST["submit"] == "Add PDF to Comm and Special Projects")
  {
      $addsubp = $_POST["addsubp"];
      $addsubp_name = $_POST["addsubp_name"];
      $commuploadedfile = $_FILES['uploadedfile']['name'];
      $sqldoc = "INSERT INTO projects_links (pid, display_name, link) VALUES ('".$addsubp."','".$addsubp_name."','".$commuploadedfile."')";
      mysql_query($sqldoc) or die(mysql_error()); 
      echo "&lt;BR&gt;";
      $target_path = "D:\\Hosting\\69903\\html\\pdfs\\comm\\";    
      $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); 
  
      if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
          echo "&lt;br&gt;The file ".  basename( $_FILES['uploadedfile']['name']). 
          " has been uploaded&lt;br&gt;";
      } else{
          echo "&lt;br&gt;There was an error uploading the file, please try again.&lt;br&gt;";
      }
  }
  ?&gt;
  &lt;form method="post"&gt;
  Add PDF to Project for Committees and Special Projects &lt;br&gt;Choose Project&lt;select name="addsubp"&gt;&lt;?php
  
  $query = "SELECT
  projects.*
  FROM
  projects";
  $showresult = mysql_query($query);
  $csp_c = 1;
  while($buyarray = mysql_fetch_assoc($showresult))
  {
      echo "&lt;option value=".$buyarray['id']."&gt;".$buyarray["pname"]."&lt;/option&gt;";
  }
  
  ?&gt;&lt;/select&gt;&lt;br&gt;
  Choose Display Name for PDF &lt;input type="text" name="addsubp_name" /&gt; &lt;Br&gt;
  Choose PDF: &lt;input name="uploadedfile" type="file" /&gt; &lt;Br&gt;
  &lt;input type="submit" value="Add PDF to Comm and Special Projects" name="submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I have made sure that the application has write privileges to the "comm" directory. I have godaddy and used the file manager to make sure of that. I have had problems with permissions in this project before, so I know this isn't case. It keeps printing </p>
  
  <p>There was an error uploading the file, please try again.</p>
  
  <p>It doesn't attempt to upload any PDF at all, what am I doing wrong?
   thanks!</p>