How to upload image path and name to database - Codeigniter
You must pass this data to your insert as array $this->upload->data()
At your Controller you must set when validation is done
else{ $this->MODELNAME->insert_images($this->upload->data()); $data = array('upload_data' => $this->upload->data()); $this->load->view('members/header'); $this->load->view('members/upload_success', $data); $this->load->view('members/footer');}
And at your model:
function insert_images($image_data = array()){ $data = array( 'filename' => $image_data['file_name'], 'fullpath' => $image_data['full_path'] ); $this->db->insert('bedrijfimages', $data);}
You can check what information is inside this array at CI documentation page: Codeigniter upload library