Function
public function DelContact($field,$val)
{
$db = new ContactModel();
$db->where($field,$val)->delete();
return redirect()->to(site_url('admin/contact'));
}
Calling
<a href="<?php echo
site_url('admin/DelContact/ID/123'); ?>" onclick="return
confirm('Are you sure to delete this record')">
No comments:
Post a Comment