Multiple delete image from database and folder too |
Working with what you've got so far we can do this:
The controller: PHP Code: public function delete() The model: PHP Code: function get_photo($id) As you can see, you can even announce the user that the files were deleted or not. You simply pass the $messages to a session flashdata, and at the redirected page you simply output the results. Didn't verify if it works, but it should... And this is how I would have done it: In controller we have: PHP Code: $ownerNames = $this->input->post('item'); In model we then have: PHP Code: public function del_photos($ids) Of course this can be improved also... Website: http://avenir.ro
|
Messages In This Thread |
Multiple delete image from database and folder too - by freddy - 02-04-2015, 10:28 PM
RE: Multiple delete image from database and folder too - by egall8 - 02-05-2015, 09:33 AM
RE: Multiple delete image from database and folder too - by freddy - 02-05-2015, 09:43 PM
RE: Multiple delete image from database and folder too - by freddy - 02-05-2015, 09:47 PM
RE: Multiple delete image from database and folder too - by CroNiX - 02-05-2015, 09:53 AM
RE: Multiple delete image from database and folder too - by egall8 - 02-05-2015, 10:01 AM
RE: Multiple delete image from database and folder too - by freddy - 02-05-2015, 09:45 PM
RE: Multiple delete image from database and folder too - by Avenirer - 02-06-2015, 12:34 AM
RE: Multiple delete image from database and folder too - by freddy - 02-06-2015, 07:07 PM
|