title: updating multiple values to mysql database using codeigniter
body: <p>my post data from form is coming as </p>
  
  <pre><code>Array
  (
      [radiogroup_1] =&gt; 1
      [radiogroup_2] =&gt; 4
      [radiogroup_4] =&gt; 11
      [submit] =&gt; submit
  )
  </code></pre>
  
  <p>and my model is </p>
  
  <pre><code> function add_votes(){
  
      foreach($POST[] as $k=&gt; $v){
      $id = $v;
      }
  
      $this-&gt;db-&gt;where('answerid','radiogroup_'. $id );
  
      $this-&gt;db-&gt;set('votes', 'votes+1',FALSE);
      $this-&gt;db-&gt;update('vote_table');
  
  
   }
  </code></pre>
  
  <p>apparently, it's not working.</p>