title: How to Fix My Form Didn't Update Data to Database [Codeigniter]
body: <p>I have a problem with my form. When i input the form and submit, the form didn't save to my database.
  In my form showing code transaction, and email customer. And if customer buying product in my website.
  I just confirmation the order with click form code transaction.</p>
  
  <p>In form code transaction showing, code transaction and email customer. And me input the logistic name, no. order of logistic to customer tracking their order, and choice the order packet has sending.</p>
  
  <p>But in my problem the form succes save the order packet information "has sending" , but for logistic name and no. order of logistic didn't save.</p>
  
  <p>This is my view.</p>
  
  <pre><code>&lt;div id="&lt;?php echo $row['codetrans'] ?&gt;" class="reveal-modal"&gt;
  &lt;h3&gt;Detail Order&lt;/h3&gt;
  &lt;?php echo form_open('order/edit_stats_order');
      $codetrans = array(
      'name'  =&gt; 'codetrans',
      'class' =&gt; 'column',
      'size' =&gt; '30'
      );
  
      $email = array(
      'name'  =&gt; 'email',
      'class' =&gt; 'column',
      'size' =&gt; '30'
      );
      $no_order = array(
      'name'  =&gt; 'no_order',
      'class' =&gt; 'column',
      'size' =&gt; '30'
      );
  
      $log = array(
      'FedEx' =&gt; 'FedEx', 
      'RPX' =&gt; 'RPX');
  
      ?&gt;
      &lt;span&gt;Code :&lt;/span&gt;
      &lt;?php echo form_input($codetrans,$row['codetrans']) ?&gt;&lt;br/&gt;
      &lt;span&gt;Email :&lt;/span&gt;
      &lt;?php echo form_input($email,$row['email']) ?&gt;&lt;br/&gt;                                     
      &lt;span&gt;Logistic Name :&lt;/span&gt;&lt;br/&gt;           
      &lt;?php echo form_dropdown('log', $log,$row['log']); ?&gt;&lt;br/&gt;&lt;br/&gt;
      &lt;span&gt;No. Order :&lt;/span&gt;
      &lt;?php echo form_input($no_order,$row['no_order']) ?&gt;&lt;br/&gt;
  
      &lt;?php  $options = array(
      '0' =&gt; 'Not Sendirng', 
      '1' =&gt; 'Has Sending'); ?&gt;&lt;br/&gt;
  
      &lt;?php echo form_dropdown('stats_order', $options,$row['stats_order']); ?&gt;&lt;br/&gt;
      &lt;?php echo form_hidden('input_hidden_id',$row['codetrans']);?&gt;
      &lt;?php echo form_submit('submit', 'Submit', 'class=searchbutton'); ?&gt;
      &lt;?php echo form_close();?&gt;
      &lt;a class="close-reveal-modal"&gt;&amp;#215;&lt;/a&gt;
  &lt;/div&gt;                                       
      &lt;?php
      }
      ?&gt;
  &lt;/ul&gt;
  &lt;?php echo anchor('order/stats_order', 'Open All Stats', 'class="btn btn_aS"' ); ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This my controller.</p>
  
  <pre><code>public function edit_stats_order() {
      $this-&gt;load-&gt;model('Order_model');
      $codetrans = $this-&gt;input-&gt;post('codetrans');
      $email = $this-&gt;input-&gt;post('email');
      $log = $this-&gt;input-&gt;post('log');
      $no_order = $this-&gt;input-&gt;post('no_order');
      $stats_order = $this-&gt;input-&gt;post('stats_order');
      if($email !='' &amp;&amp; $codetrans !='' &amp;&amp; $log !='' &amp;&amp; $no_order !=''){
          $this-&gt;Order_model-&gt;edit_stats_order($codetrans,$email,$log,$no_order);
          redirect('order/main');
      }
      else{
          echo "&lt;script&gt;alert('Check Again!');&lt;/script&gt;";
          echo "&lt;script&gt;location.href = document.referrer&lt;/script&gt;";
      }
  
  }
  </code></pre>
  
  <p>This is my model.</p>
  
  <pre><code>public function edit_stats_order($codetrans,$email,$log,$no_order){
      date_default_timezone_set('xxxxx'); 
       $data['email'] = $email;     
          $data['no_order'] = $no_order;
          $data['log'] = $log;
          $data['stats_order'] = $stats_order;
          $data['date'] = date('Y-m-d');
          $this-&gt;db-&gt;where('codetrans',$codetrans);
          $this-&gt;db-&gt;update('ordering',$data);
  }
  </code></pre>
  
  <p>Why the fault in my code?
  Thanks</p>