title: Update codeigniter cart without using $_POST directly
body: <p>I figured out using the default code on the codeigniter page ....<a href="http://ellislab.com/codeigniter/user-guide/libraries/cart.html" rel="nofollow">here</a> how to update the cart with the direct <code>$_POST</code> content. </p>
  
  <pre><code>function update() {
  
      $data = $_POST;
  
      $this-&gt;cart-&gt;update($data);
  
      redirect('/cart', 'refresh');
  }
  </code></pre>
  
  <p>How do I not use the direct post variables since it is not safe? </p>
  
  <p>$_POST var_dumps() as the following array: </p>
  
  <pre><code>array(1) { [1]=&gt; array(2) { ["rowid"]=&gt; string(32) "88a180b440d9f4b69e09296c60095867" ["qty"]=&gt; string(1) "1" } }
  </code></pre>