Codeigniter: How to handle direct link to controller/function/param?
Posted
by rebjr
on Stack Overflow
See other posts from Stack Overflow
or by rebjr
Published on 2010-04-06T18:35:09Z
Indexed on
2010/04/06
21:23 UTC
Read the original article
Hit count: 155
codeigniter
|controller
I have a simple controller function which deletes a DB entry (it uses a model function to do so). I have a link to this in one of my views (e.g. http://www.example.com/item/delete/3) and I’m using jQuery to display a confirm dialog to make sure the user really wants to delete it. All fine. However if you just enter that URL in your browser the item is deleted without warning.
Is there a way to handle this either in the way I code the controller function or in the model?
© Stack Overflow or respective owner