[eluser]Michael Wales[/eluser]
Why exactly do you feel the need to add data to the post array? The only reason I could think of, is you are posting data directly to the database via the POST array (which is a bad idea).
Regardless, if you want the field in the table to house either 1 or 0 (checked or not), simply assign a default value to that field. Therefore, if you submit data to the database, and checkbox is not defined, it will receive the default value.
1. THE GOOD SOLUTION. Process all of the data you will be inserting into the database, something like this:
Code:
$insert->username = $this->input->post('username');
$insert->password = $this->input->post('password');
if ($this->input->post('checkbox') {
$insert->checkbox = $this->input->post('checkbox');
}
2. THE BAD SOLUTION. Continue to process the post array openly.