Hi all I have a few checkboxes in Codeigniter, eg:
$data = array(
'name' => 'newsletter',
'id' => 'newsletter',
'value' => 'accept',
'checked' => TRUE,
'style' => 'margin:10px',
);
echo form_checkbox($data);
eg produces:
<input type="checkbox" name="newsletter" id="newsletter" value="accept" checked="checked" style="margin:10px" />
is there a way that I can check in codeigniter whether the box has been selected or not in my controller? if I use $this->input->post('newsletter') and the box has been selected will the value be false? if so how can I run form validation on the data?