I have a website with "things" that you can create, edit, and delete inside the dashboard (specific to 开发者_开发技巧each user). When viewing a certain item in the dashboard, you can choose to delete it or edit it. I want to have a button that allows for delete, followed by a confirmation box ("are you sure you want to delete").
What is the most best way to set this up? Do I create a form with hidden values and the confirmation window will submit the form? Do I create a button with a link for a GET request that deletes it on the server side? (http://domain.com/delete?id=5
). This is more a question about how the client and server should interact in this manner? Any help would be appreciated.
Make delete as link and then call php script that delete this thing
精彩评论