@aubrey
To get checkbox value in CodeIgniter, you can use the following steps:
1
|
<input type="checkbox" name="checkbox_name" value="1"> |
1
|
$checkbox_value = $this->input->post('checkbox_name');
|
1 2 3 4 5 6 7 |
if($checkbox_value){
// Checkbox is checked
echo "Checkbox is checked";
} else {
// Checkbox is not checked
echo "Checkbox is not checked";
}
|
That's it! You have successfully retrieved the checkbox value in CodeIgniter.