jeudi 23 octobre 2014

Delete post from a list of posts via AJAX?


Vote count:

0




Say I'm making a webpage with a list of users' posts (eg. Twitter feed) and the user wants to delete a post from it. The list is dynamically generated using PHP and a MySQL DB. I also have a delete.php which takes an ID as an input via a POST request and deletes the entry with the ID. I know I can send a post request via jquery, by having the user click on a delete icon, placed besides every post on the feed. How should I structure the HTML so that I can figure out which post to delete? Should I include an ID to the outputted HTML? Or is there something else? Please help!



asked 42 secs ago







Delete post from a list of posts via AJAX?

Aucun commentaire:

Enregistrer un commentaire