title: Codeigniter not uploading image
body: <h2>Problem</h2>
  
  <p>I have form for registring students. Now I am trying to insert data with uploading image however to database comes only file name. Uploads file is empty! My view form input type is 'file'.</p>
  
  <h2>Controller</h2>
  
  <pre><code>$config['upload_path'] = APPPATH.'uploads';
      $config['allowed_types'] = 'gif|jpg|png';
      $config['max_size'] = '100';
      $config['max_width']  = '1024';
      $config['max_height']  = '768';
      $this-&gt;upload-&gt;do_upload('image');
      $this-&gt;load-&gt;library('upload',$config);
  
      if($this-&gt;form_validation-&gt;run())
      {
          $data = array(
              'student_name'=&gt;$this-&gt;input-&gt;post('name'),
              'student_surname'=&gt;$this-&gt;input-&gt;post('surname'),
              'student_middlename'=&gt;$this-&gt;input-&gt;post('middlename'),
              'student_birth'=&gt;$this-&gt;input-&gt;post('date'),
              'student_add_date' =&gt; date('Y-m-d'),
              'student_gender'=&gt;$this-&gt;input-&gt;post('gender'),
              'student_addres'=&gt;$this-&gt;input-&gt;post('address'),
              'student_mobile'=&gt;$this-&gt;input-&gt;post('phone'),
              'student_email'=&gt;$this-&gt;input-&gt;post('email'),
              'student_image'=&gt;$this-&gt;upload-&gt;do_upload('image')
  
          );
  
          $this-&gt;member-&gt;add_student($data);
          redirect('members/student_list');               
      }
  </code></pre>