title: Trying to upload picture but does not save to server
body: <p>something  lot simpler than the usual crap I post about!
  Trying to create an 'Upload' button to allow user to upload pictures of themselves. The picture should then be renamed pid, and saved to the images folder..</p>
  
  <p>I'm not sure why it isn't working, especially as firebug shows that fileField is being posted.</p>
  
  <pre><code>&lt;?php 
  // Parse the form data and add inventory item to the system
  if (isset($_POST['picID'])) {
      $pid = $_SESSION["pid"];
      // Place image in the folder 
      $newname = "$pid.jpg";
      move_uploaded_file( $_FILES['fileField']['tmp_name'], "images/$newname");
      header("location: index.php"); 
      exit();
      }   
  ?&gt;
  </code></pre>
  
  <p><strong>Picture upload field</strong></p>
  
  <pre><code> &lt;form method='post' enctype='multipart/form-data' action='playerparent-profile.php?pid=&lt;?=$pid?&gt;'&gt;
              &lt;td&gt;&lt;label&gt;
            &lt;input type="file" name="fileField" id="fileField" /&gt;
                    &lt;input type="hidden" name="picID" id="picID" value="&lt;?=$pid?&gt;"&gt;
                   &lt;input type="submit" name="button" id="button" value="UPLOAD" /&gt;
          &lt;/label&gt;&lt;/td&gt;
          &lt;/form&gt;
  </code></pre>
  
  <p>Just trying to figure out what the heck I'm doing wrong? Any help is appreciated!</p>