<input type="checkbox" name="chkbx" value="true" checked>
$data['active'] = $this->input->post('active');
if($data['active'] == true){
echo $data['active'] = 1 ;
}
else{
echo $data['active'] = 0 ;
}
It always put 0 value in database. I can't understand.
please help me to solve this problem.