title: how to store multiple checkbox values in database using codeigniter
body: <pre><code>&lt;tr&gt;&lt;th&gt;Option Subject&lt;/th&gt;
   &lt;th&gt;
  &lt;input type="checkbox" name="skills" id="skills[]" value="C++"&gt; C++&lt;br&gt;
  &lt;input type="checkbox" name="skills" id="skills[]" value="JAVA"&gt; JAVA&lt;br&gt;
  &lt;input type="checkbox" name="skills" id="skills[]" value="HTML"&gt; HTML&lt;br&gt;
  &lt;input type="checkbox" name="skills" id="skills[]" value="PHP"&gt; PHP&lt;br&gt;
  &lt;input type="checkbox" name="skills" id="skills[]" value="ASP.NET"&gt;ASP.NET&lt;br&gt;
  &lt;font color="#FF0000"&gt;&lt;?php echo form_error('skills');?&gt;&lt;/font&gt;
   &lt;/th&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p><em>controler</em>
      public function insert() 
      {
      $skills=$this->form_validation->set_rules('skills', 'Option Subject','required');</p>
  
  <pre><code>$data = array(
      'skills' =&gt; implode(",", $skills);       
  );
  }
  
  
  
  if(isset($options['skills'])) 
   $this-&gt;db-&gt;set('skills',($options['skills']));  
   $this-&gt;db-&gt;insert("regi_user");  
   return $this-&gt;db-&gt;insert_id();  
  </code></pre>