title: Move uploaded file in php work only sometimes when use multiple uploads
body: <p>I have a web page for uploading tile image and a concept design image using that tile with a single submit button. But when uploading 2 images with a single submit, move uploaded file is not working always. Sometimes it just moves tile images only, not concept image. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>if(isset($_POST['upload']))
  {
      $name=$_POST['name'];
      $size=$_POST['size'];
      $finish=$_POST['finish'];
      /* Concept Image */
      $concept=$_FILES['concept']['name'];
      $contmp=$_FILES['concept']['tmp_name'];
      $location='concept';
      $upload=move_uploaded_file($contmp,'concept/'.$concept);
      $confile='concept/'.$concept; 
      /* Tile Image */
      $image=$_FILES['image']['name'];
      $imgtmp=$_FILES['image']['tmp_name'];
      $location='tileimage';
      $uploading=move_uploaded_file($imgtmp,"tileimage/".$image);
      $upfile="tileimage/".$image;
      $qry="insert into tile_list value('','$name','$size','$finish','$upfile','$confile')";
      $ex=mysqli_query($con,$qry);
      $query="insert into availcolors value('','$name','$name','$upfile','$confile')";
      $exe=mysqli_query($con,$query);
  }
  </code></pre>
  
  <p>and here is my html markup:</p>
  
  <pre><code>    &lt;form method="post" enctype="multipart/form-data" class="form-horizontal"&gt;
             &lt;div class="form-group"&gt;
                &lt;label class="control-label col-sm-4"&gt;TILE IMAGE&lt;br&gt;
                &lt;/label&gt;
                &lt;div class="col-sm-10 col-md-offset-0 col-md-4"&gt;
                &lt;input type="file" class="form-control" name=image&gt;
                &lt;/div&gt; 
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                &lt;label class="control-label col-sm-4"&gt;CONCEPT 3D&lt;br&gt;
                &lt;/label&gt;
                &lt;div class="col-sm-10 col-md-offset-0 col-md-4"&gt;
                &lt;input type="file" class="form-control" name="concept"&gt;
                &lt;/div&gt; 
              &lt;/div&gt;
              &lt;div class="col-sm-10 col-md-7 col-md-offset-4"&gt;
                &lt;button type="submit" name="upload"&gt;&lt;img src="images/upload.jpg" alt="" width="106" height="25" class="img-responsive"&gt;&lt;/button&gt;
              &lt;/div&gt;
  &lt;form&gt;
  </code></pre>
  
  <p>Please help me to find out what is the problem</p>