title: Old picture is missing
body: <p>So I have "staff" table in database i.e. StaffName, StaffAddress and StaffProfilePicture etc. Updating works fine on name, address but not the picure. The old picture seems to be missing from the database eventhough I don't upload a new one.</p>
  
  <pre><code>    if(isset($_POST['submit'])){
  
          $target_dir = "images/staff/";
          $target_dir = $target_dir . basename($_FILES["new_profilepicture"]["name"]);
          $uploadOk=1;
  
          if (file_exists($target_dir . $_FILES["new_profilepicture"]["name"])) {
          //echo "Sorry, file already exists.";
          $uploadOk = 0;
      }
          if ($uploadOk==0) {
          //echo "Sorry, your file was not uploaded.";
      } 
      else { 
      if (move_uploaded_file($_FILES["new_profilepicture"]["tmp_name"], $target_dir)) {
          $imageup = $target_dir;
          //echo "&lt;img src='" . $imageup . "' /&gt;";
      } else {
          //echo "Sorry, there was an error uploading your file.";
      }
  }
          $_var1 = $_POST['new_name'];
          $_var2 = $_POST['new_email'];
          $_var3 = $_POST['new_password'];
          $_var4 = $_POST['new_contactno'];
          $_var5 = $_POST['new_icno'];
          $_var6 = $_POST['new_address'];
          $_var7 = $_POST['new_status'];
          $_var8 = $imageup;
  
          $query1 =   $mysqli-&gt;query("UPDATE staff
                              SET StaffName='$_var1', StaffEmail='$_var2', StaffPassword='$_var3', StaffContactNo='$_var4', StaffICNo='$_var5', StaffAddress='$_var6', StaffStatus='$_var7', StaffProfilePicture='$_var8'
                              WHERE StaffID='$staffID'");
  
          $success = mysql_query($query1);//is mysql query working?
  
              if($success){
                  //$oldprofilepicture = $staff['StaffProfilePicture'];
                  //if(file_exists($oldprofilepicture)){
                      //unlink($oldprofilepicture);//delete now
              echo "success";
              header('location:staff_profile.php');
              die;
              }else{
              echo "failed";
              }
          }
  </code></pre>
  
  <p>Below is the HTML form for the picture</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td width="170"&gt;Old Profile Picture:&lt;/td&gt;
      &lt;td&gt;&lt;img src="&lt;?php echo $profilepicture ?&gt;" width="100" height="80" /&gt;&lt;br&gt;&lt;br&gt;
          &lt;input type="file" name="new_profilepicture" /&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p><strong>How can I make the old/existed picture stay?</strong> </p>