title: update record with the form - Codeigniter 2.1
body: <p>i have some problem with update in CI 2.1
  I followed the user guide "mini-tut" for create e news, but i cant understand how to update a record with a form.</p>
  
  <p>my update models is:</p>
  
  <pre><code>    // update dei record
  public function update_news($id)
  {
      $data = array(
          'title' =&gt; $this-&gt;input-&gt;post('title'),
          'slug' =&gt; $this-&gt;input-&gt;post('slug'),
          'text' =&gt; $this-&gt;input-&gt;post('text')
          );
  
      $this-&gt;db-&gt;where('id', $id);
      $this-&gt;db-&gt;update('news', $data); 
  }
  </code></pre>
  
  <p>how can i make the controller for update?? i try:</p>
  
  <pre><code> public function update($id)
   {
    $this-&gt;load-&gt;helper('form');
    $this-&gt;load-&gt;library('form_validation');
  
    $data['title'] = 'Update an intem';
  
    $this-&gt;form_validation-&gt;set_rules('title', 'Title', 'required');
    $this-&gt;form_validation-&gt;set_rules('text', 'text', 'required');
  
    if ($this-&gt;form_validation-&gt;run() === FALSE)
    {
     $this-&gt;load-&gt;view('templates/header', $data); 
     $this-&gt;load-&gt;view('news/update');
     $this-&gt;load-&gt;view('templates/footer');
    }
   else
    {
     $this-&gt;news_model-&gt;update_news($id);
     $this-&gt;load-&gt;view('news/success');
    }
   }
  </code></pre>
  
  <p>but i display a 404() page...</p>
  
  <p>the views for update is:</p>
  
  <pre><code>    &lt;h2&gt;Update an item&lt;/h2&gt;
  
  &lt;?php echo validation_errors(); ?&gt;
  
  &lt;?php echo form_open('news/update') ?&gt;
  
   &lt;label for="title"&gt;Title&lt;/label&gt; 
   &lt;input type="input" name="title" /&gt;&lt;br /&gt;
  
   &lt;label for="slug"&gt;Slug&lt;/label&gt; 
   &lt;input type="input" name="slug" /&gt;&lt;br /&gt;
  
   &lt;label for="text"&gt;Text&lt;/label&gt;
   &lt;textarea name="text"&gt;&lt;/textarea&gt;&lt;br /&gt;
  
   &lt;input type="submit" name="submit" value="Update an item" /&gt; 
  
  &lt;/form&gt;  
  </code></pre>
  
  <p>any one can help me how do a "simnple" update for understand a CI logic?</p>