[eluser]jaybizzle[/eluser]
I'm uploading mutiple files and cant seem to figure out how to store multiple entries of the file_name & file_path to database for all my files that are being uploaded, only the first file data is stored into the db but all my images are uploaded.
If anyone can give me some advice that be great. Thanks!
Code:
$files = $this->upload->do_upload();
if ( ! $files)
{
$data['error'] = array('error' => $this->upload->display_errors());
}
else
{
//$data['error'] = array('error' => $this->upload->display_errors());
$uploaddata = $this->upload->data();
$filepath = $uploaddata['full_path'];
$filename = $uploaddata['file_name'];
$array = array(
'image_path' => $filepath,
'filename' =>$filename,
);
$this->db->insert('images', $array);
$data['upload_data'] = array('upload_data' => $uploaddata);
}