title: Can't update data to database with codeigniter
body: <p>I'm having trouble updating the data in the database with codeigniter. This is my controller :</p>
  
  <pre><code>  public function update_mission_vision($id)
      {
          $this-&gt;securePage();
  
  
          $data['mission'] = $mission = $this-&gt;about_model-&gt;get_mission_vision($id);
  
          if ($mission == false) {
              $this-&gt;session-&gt;set_flashdata('msg', 'The mission does not exist.');
              redirect('about/manage-miteri-mission-vision');     
          } else {
              if ($this-&gt;input-&gt;post('submit')) {
                  $this-&gt;form_validation-&gt;set_rules('title', 'title', 'required|max_length[240]');
                  $this-&gt;form_validation-&gt;set_rules('details', 'details', 'required|max_length[240]');
  
                  if ($this-&gt;form_validation-&gt;run()) {
                      $added_on = time();
  
                      $this-&gt;about_model-&gt;update_mission_vision($added_on, $id);
  
                      $this-&gt;session-&gt;set_flashdata('msg', 'mission updated successfully.');
                      redirect('about/manage-miteri-mission-vision');
                  }
  
              }
          }
  
          $data['title'] = "$mission-&gt;title | miteripkr.com";
          $data['keywords'] = "$mission-&gt;title";
          $data['content'] = $this-&gt;load-&gt;view('about-us/update_mission_vision', $data, true);
          $this-&gt;load-&gt;view('miteri', $data);
      }
  </code></pre>
  
  <p>And this is my models :</p>
  
  <pre><code>function get_all_mission_vision($limit = null, $offset = null)
      {
          if ($limit)
          {
              $this-&gt;db-&gt;limit($limit. $offset);
  
          }
          return $this-&gt;db-&gt;get('mission_vision');
  
      }
  
  
  function get_mission_vision($id)
  {
          $this-&gt;db-&gt;where('id', $id);
          $query = $this-&gt;db-&gt;get('mission_vision');
  
          if ($query-&gt;num_rows()) {
              return $query-&gt;row();
          } else {
              return false;
          }
  }
  
  
  
  function update_mission_vision($id, $added_on)
  {
          $this-&gt;db-&gt;where('id', $id);
          $this-&gt;db-&gt;set('title', $this-&gt;input-&gt;post('title'));
          $this-&gt;db-&gt;set('details', $this-&gt;input-&gt;post('details')); 
          $this-&gt;db-&gt;set('added_on', $added_on);
          $this-&gt;db-&gt;update('mission_vision');
  }
  </code></pre>
  
  <p>This is my view :</p>
  
  <pre><code>&lt;**div class="container-fluid" style="background:#fff; margin-top:10px; border-radius:5px; min-height:600px; margin-bottom:10px;"&gt;
  
      &lt;form action="" method="post" style="margin-top:30px;"&gt;
          &lt;?php echo $this-&gt;session-&gt;flashdata('msg');?&gt;
  
          &lt;ol class="breadcrumb"&gt;
              &lt;li&gt;&lt;a href="#"&gt;admin&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;about us&lt;/a&gt;&lt;/li&gt;
              &lt;li class="active"&gt;&lt;a href="#"&gt;update mission &amp; vision&lt;/a&gt;&lt;/li&gt;
          &lt;/ol&gt;
          &lt;div class="form-group"&gt;
              &lt;label for="title"&gt; Title for Post&lt;/label&gt;
              &lt;input class="form-control" type="text" name="title" placeholder="Enter Title" value="&lt;?php echo set_value('title', $mission-&gt;title)?&gt;"&gt; 
              &lt;?php echo form_error('title');?&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              &lt;label for="title"&gt; Details for Post&lt;/label&gt;
              &lt;textarea class="ckeditor" name="details" placeholder="Enter Details" style="height:200px;"&gt;&lt;?php echo set_value('details', $mission-&gt;details); ?&gt;&lt;/textarea&gt;
              &lt;?php echo form_error('details');?&gt;
          &lt;/div&gt;
          &lt;button class="btn btn-success" name="submit" type="submit" value="update"&gt;&lt;span class="glyphicon glyphicon-ok"&gt; update&lt;/span&gt;&lt;/button&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It even prints a success message but my data is not updated, why?</p>