title: Codeigniter checkbox returns always 0
body: <p>I've a form to add a project with a checkbox if the project is already finished or not. This is the html in the view (codeigniter): </p>
  
  <pre><code>&lt;div class="form-group"&gt;
                              &lt;label&gt;Task completed:&lt;/label&gt;
                              &lt;input type="checkbox" class="form-control" id="task_completed" name="task_completed" /&gt;
                              &lt;?php echo form_error('task_completed'); ?&gt;
  
                          &lt;/div&gt;
  </code></pre>
  
  <p>I load the data in my controller: </p>
  
  <pre><code>$checked = (int)$this-&gt;input-&gt;post('task_completed');
  </code></pre>
  
  <p>when i do a <code>echo "" . $checked;</code> it's always 0!!
  Also, in my database. Where is my fault?</p>