title: how to update a particular row in codeigniter?
body: <p>I am newbie in Code Igniter.i want to update a specific row on update. </p>
  
  <p>Please help me.</p>
  
  <p>My View file</p>
  
  <pre><code>&lt;div id="wrapper"&gt;
  &lt;div id="form"&gt;
  &lt;?php $query=$this-&gt;mod1-&gt;about_display()?&gt;
  &lt;?php if($query){  ?&gt;
  &lt;?php   echo form_open('textarea/update_testimonial');   ?&gt;
   &lt;?php foreach($query as $row){ ?&gt;
   &lt;textarea name="update"&gt;&lt;?php echo  $row-&gt;testi; ?&gt;&lt;/textarea&gt;
   &lt;input type="submit" name="sub" value="UPDATE" /&gt;
   &lt;/form&gt;
   &lt;?php } 
  
      }
  ?&gt;
  &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>My Controller file</p>
  
  <pre><code>function update_testimonial(){
  
     $id = $this-&gt;input-&gt;get('id');
     $this-&gt;load-&gt;model('mod1');
     $this-&gt;mod1-&gt;about_display($id);
  
  
  }
  </code></pre>
  
  <p>my model file</p>
  
  <pre><code>   function about_display(){
   $id = $this-&gt;input-&gt;get('id'); 
  $query=$this-&gt;db-&gt;where('id', $id);
      $this-&gt;db-&gt;get('testimonials');
      if($query-&gt;num_rows()&gt;0){
          return TRUE;
      }else{
          return FALSE;
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Please give me a simple example so I can do it. I am very new in CI. Please help me out. Thank you</p>