Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $filesCount = count($_FILES['photo_gallery']['name']);
- for($i = 0; $i < $filesCount; $i++){
- $_FILES['gambar_tambah']['name'] = $_FILES['photo_gallery']['name'][$i];
- $_FILES['gambar_tambah']['type'] = $_FILES['photo_gallery']['type'][$i];
- $_FILES['gambar_tambah']['tmp_name'] = $_FILES['photo_gallery']['tmp_name'][$i];
- $_FILES['gambar_tambah']['error'] = $_FILES['photo_gallery']['error'][$i];
- $_FILES['gambar_tambah']['size'] = $_FILES['photo_gallery']['size'][$i];
- $file_name=$this->crud->upload_file('gambar_tambah',$upload_image_path);
- $image_data[$i]['image'] = $file_name;
- $this->crud->add('table_name',$image_data[$i]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement