I just added more code to the first line. I hate it when I leave out code! … I know I’m making this more complicated than it needs to be so any help is appreciated. I’m inserting a form (EE 2.3.1) using codeigniter, so that I can run a database check to see if the user has already submitted the form.
The checkbox array field (checkboxVar) is causing errors before the data can insert into the db.
$data = array(
'first_name1' => $this->EE->input->post('first_name1', TRUE),
'last_name1' => $this->EE->input->post('last_name1', TRUE),
'checkboxVar' => $this->EE->input->post('checkboxVar', TRUE),
'form_name' => 'Form Name',
'entry_date' => $entryDT,
'edit_date' => $editDT,
'status' => 'open'
);Unfortunately I’m getting an error: Array to string conversion Filename: mysql/mysql_driver.php Line Number: 555
Error Number: 1054
Unknown column 'Array' in 'field list'
---the insert code appears here---
Filename: libraries/Functions.php(680) : eval()'d code
Line Number: 300
Line 300 is below
$this->EE->db->insert('exp_freeform_entries', $data);Any chance that my first line of code above just needs a slight adjustment and it will be all set? Thanks!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.