title: Cant Insert into database when upload [codeigniter]
body: <p>i trying to upload file but its still cant insert to database i dont know why, i've try many code but none of it working, much appreciate if you help me</p>
  
  <p>here's my code :  </p>
  
  <pre><code>    $upload_image_dp1 = $_FILES['upload_dp1']['name'];
      $upload_image_dp2 = $_FILES['upload_dp2']['name'];
      $upload_image_dp3 = $_FILES['upload_dp3']['name'];
      $upload_file_invoice = $_FILES['upload_invoice']['name'];
  
      if (!empty($upload_image_dp1) &amp;&amp; !empty($upload_image_dp2) &amp;&amp; !empty($upload_image_dp3) &amp;&amp; !empty($upload_file_invoice)) {
          $config['upload_path'] = './assets/img/uploads/dp/';
          $config['allowed_types'] = 'gif|jpg|png';
          $config['max_size']     = '10240';
          $this-&gt;load-&gt;library('upload', $config);
  
          // $config2['upload_path'] = './assets/img/uploads/invoice/';
          // $config2['allowed_types'] = 'pdf';
          // $config2['max_size']     = '10240';
          // $this-&gt;load-&gt;library('upload', $config2);
  
          $upload_dp1 = $this-&gt;upload-&gt;do_upload('upload_dp1');
          $file1 = $this-&gt;upload-&gt;data('file_name');
          $upload_dp2 = $this-&gt;upload-&gt;do_upload('upload_dp2');
          $file2 = $this-&gt;upload-&gt;data('file_name');
          $upload_dp3 = $this-&gt;upload-&gt;do_upload('upload_dp3');
          $file3 = $this-&gt;upload-&gt;data('file_name');
          $upload_invoice = $this-&gt;upload-&gt;do_upload('upload_invoice');
          $file4 = $this-&gt;upload-&gt;data('file_name');
  
          $this-&gt;db-&gt;set('upload_dp1', $file1);
          $this-&gt;db-&gt;set('upload_dp2', $file2);
          $this-&gt;db-&gt;set('upload_dp3', $file3);
          $this-&gt;db-&gt;set('upload_invoice', $file4);
          $this-&gt;db-&gt;where('id_user', $this-&gt;user['id_user']);
          $this-&gt;db-&gt;where('status', "Not Complete");
          $this-&gt;db-&gt;where('id_type', $id_type);
          $this-&gt;db-&gt;update('passanger');
  </code></pre>