title: Conflict when uploading images with multiple file field in codeigniter
body: <p>Codeigniter: File successfully upload when setting only one field(individual). But when setting both field second file is also uploaded to first's location. How to solve this conflict.
  Is there any tutorial for multiple upload field????</p>
  
  <p>My code is given below:</p>
  
  <pre><code>&lt;input type="file" name="filePrdimage" id="filePrdimage" size="20"/&gt;
  &lt;input type="file" name="filePrdlogo" id="filePrdlogo" size="20"/&gt;
  </code></pre>
  
  <p>. //            Image uploading codes</p>
  
  <pre><code>          $config['upload_path'] = 'assets/images/b2bproduct';
              $config['allowed_types'] = 'gif|jpg|jpeg|png';
              $config['max_size'] = '1000';
              $config['max_width'] = '2024';
              $config['max_height'] = '1768';
              $config['overwrite'] = TRUE;
              $config['remove_spaces'] = TRUE;
              if (isset($_FILES['filePrdimage']['name'])) {
                  $config['file_name'] = substr(md5(time()), 0, 28) . $_FILES['filePrdimage']['name'];
              }
              $this-&gt;load-&gt;library('upload', $config);
              if (!$this-&gt;upload-&gt;do_upload('filePrdimage')) {
                  //no file uploaded or failed upload
                  $error = array('error' =&gt; $this-&gt;upload-&gt;display_errors());
              } else {
                  $dat = array('upload_data' =&gt; $this-&gt;upload-&gt;data());
                  $this-&gt;resize($dat['upload_data']['full_path'], 'assets/images/b2bproduct/thump/'.$dat['upload_data']['file_name'],180,400);
              }
  
              if (empty($dat['upload_data']['file_name'])) {
                 $prdimage = $this-&gt;input-&gt;post('hdPrdimage');            
              }
            else {
  
                $prdimage = $dat['upload_data']['file_name']; 
            }
  
  
  //            End Image uploading Codes
  
   //           Logo uploading codes
              $config['upload_path'] = 'assets/images/b2blogo';
              $config['allowed_types'] = 'gif|jpg|jpeg|png';
              $config['max_size'] = '1000';
              $config['max_width'] = '2024';
              $config['max_height'] = '1768';
              $config['overwrite'] = TRUE;
              $config['remove_spaces'] = TRUE;
              if (isset($_FILES['filePrdlogo']['name'])) {
                  $config['file_name'] = substr(md5(time()), 0, 28) . $_FILES['filePrdlogo']['name'];
              }
              $this-&gt;load-&gt;library('upload', $config);
              if (!$this-&gt;upload-&gt;do_upload('filePrdlogo')) {
                  //no file uploaded or failed upload
                  $error = array('error' =&gt; $this-&gt;upload-&gt;display_errors());
              } else {
                  $dat = array('upload_data' =&gt; $this-&gt;upload-&gt;data());
                  $this-&gt;resize($dat['upload_data']['full_path'], 'assets/images/b2blogo/'.$dat['upload_data']['file_name'],135,300);
  
              }
              if (empty($dat['upload_data']['file_name'])) {
                 $prdlogo= $this-&gt;input-&gt;post('hdPrdlogo'); ;            
              }
            else {
                $prdlogo=$dat['upload_data']['file_name']; 
            }          
  //            End Logo uploading Codes 
  
    public function resize($source,$destination,$width,$height) {
                  $config['image_library'] = 'gd2';
                  $config['source_image'] = $source;
                  $config['create_thumb'] = FALSE;
                  $config['maintain_ratio'] = TRUE;
                  $config['width'] = $width;
                  $config['height'] = $height;
                  $config['new_image'] = $destination;
                  $this-&gt;load-&gt;library('image_lib', $config);
                  $this-&gt;image_lib-&gt;resize();
              }
  </code></pre>