Deleting users in an admin panel |
Hey guys
New here not sure if this is the right place But I have a function that needs to delete users from an admin panel My contoller function is this: public function delete($id) { $this->admin_model->delete_user($id); redirect('/admin/users/'); } View looks like this: <?php foreach ($users as $user): ?> <tr> <td><?php echo $user['id']; ?></td> <td><?php echo $user['email']; ?></td> <td><?php echo $user['name']; ?></td> <td><?php echo $user['username']; ?></td> <td><?php echo $user['date_registered']; ?></td> <td> <a href="/admin/users/edit/<?php echo $user['id']; ?>" class="btn btn-primary btn-sm">Edit</a> <a href="/admin/users/delete/<?php echo $user['id']; ?>" class="btn btn-primary btn-sm">Delete</a> </td> </tr> <?php endforeach; ?> Model: Nothing in the model Im getting a 404 on the click of the button I would love some help as im pretty stuck Thanks |
Messages In This Thread |
Deleting users in an admin panel - by Lordgreymaul - 06-24-2016, 02:19 AM
RE: Deleting users in an admin panel - by big89 - 06-24-2016, 06:02 AM
RE: Deleting users in an admin panel - by JayAdra - 06-24-2016, 06:11 AM
RE: Deleting users in an admin panel - by InsiteFX - 06-24-2016, 07:58 AM
|