title: Submit a form with file input left blank
body: <p>I am submitting a form where I am updating the <code>state id</code>, <code>city name</code> and <code>city image</code>.</p>
  
  <p>When I only update the image, it works.
  When I update <code>state id</code> and <code>city name</code> and want my old image to remain the same, the photo field become blank in the database.</p>
  
  <p>My PHP code is like this: </p>
  
  <pre><code> &lt;?php 
  
  if(isset($_POST) &amp;&amp; $_POST['submit'] == "Update")
  {
          extract($_POST);
          if($_FILES['photo'])
          {
          $cityimg = upload_file($_FILES['photo'],'cityimg/','image','N','true','thumb/', 100, 100);
          $sql = "UPDATE city SET mcid = '$mcid', city_name = '$city_name', photo = '$cityimg' WHERE cid = '$cid'";
          }
          else
          {
          $sql = "UPDATE city SET mcid = '$mcid', city_name = '$city_name' WHERE cid = '$cid'";
          }
          $result = mysql_query($sql);
          if($result)
          {
              $msg = "City Updated Successfully.";
          }
  }
  
  ?&gt;
  </code></pre>
  
  <p>I think that my loop is having some problem.</p>