[eluser]Brad K Morse[/eluser]
I have a series of checkboxes the user will select, named fruit[]
in the model, I have this
Code:
function insert() {
$data = array(
'fruit' => $this->input->post('fruit[]')
);
$this->db->insert('table_name', $data);
}
It does not insert it into the table, I assume posting an array of data within this->input->post() or an array within that data array may be a no-no.
Is there some CI magic that does that for me automatically or do I need to run thru a loop and append it to a string before submitting?