Stop Going To Funtion When Click Delete Files Button |
In my foreach loop I have a item called delete_files.
When I click delete button in my foreach loop it removes the files from storage location and database. However every time I click on the button keeps on going to that controller function I have used exit() and tried die() at end of the function Example http://forum.project.com/newthread/delete_files/1/77 Question When I click on it I still want to be able to delete the files but not have to get sent to that location, Is there any way just using php correctly that I have missed? I tried using exit() and die() not worked. PHP Code: public function delete_files($forum_id, $attachment_id) { PHP Code: public function index() { PHP Code: <?php if ($thread_attachments) {?>
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
If I'm right, you have a list of files which a user can delete individually by clicking the corresponding delete button. Wouldn't it be more logical to redirect to the list of files after you've deleted one? The deleted file will not be displayed again. So every time a delete button has been clicked, the list will be 1 item shorter.
|
Welcome Guest, Not a member yet? Register Sign In |