I am new to PHP codeigniter,
how to get checkbox values using php Codeigniter in Controller.
Here is the Checkboxes, i want to get checkbox values base on na
If only one of these checkboxes can be selected at a time, you should use a group of radio buttons (type="radio") instead. I assume this is what you are trying to do since the names of all of the inputs are the same.
To get the value of the checkbox or radio button group, use:
$this->input->post('businessType')
Edit:
If you are actually wanting checkboxes, you will need to name them all something different:
And then use the same post method as before:
$this->input->post('businessType1') //the first checkbox's value
$this->input->post('businessType2') //the second
$this->input->post('businessType3') //the third