Delete HTML table row with animation using php , AJAX in JQuery

In this post i am going to show how you can delete a database row by clicking the simple delete button in the html table. To make it faster we are using AJAX in JQuery because this will prevent the  page from refreshing every time you delete the row. We will also apply simple jquery animation to make the row to be removed smoothly.

delete-row-with-animation

delete-row-with-animation_DEMO

When the delete button of a row will be clicked the record id will be sent to the “delete.php” file and the specific record will be deleted from the database. If an error occurs in the deletion than “delete.php” will return an error message which will be shown on “table.php”.

Here is the code:

CSS Styles :

Javascript:

table.php :

delete.php :

Download Source

If you have any queries don’t hesitate to leave a comment i will get back to you as soon as possible. And dont forget to share it with your friends. Till next time HAPPY CODING!

6 thoughts on “Delete HTML table row with animation using php , AJAX in JQuery

  1. Yasir

    Very good job my friend your code is very simple and fast. I glad that i found your website and specially this topic.
    I am new in php so this topic help me alot.
    Thanks

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge