How to Delete Data from MySQL with Confirmation in PHP

This tutorial shows you that how to Delete rows From MySQL Database table with confirmation and How to set JavaScript Powered Confirmation Message When you click or press delete link a confirmation message will appear and make sure to delete the selected data or not from MySQL Database table, When You press yes on confirmed messege it will delete the data if not it will do nothing with the data. i have posted this tutorial just for absolute beginners, and at the end of the post you can see the complete code, so let's have a look at this very simple tutorial.

window.location.href='index.php?delete_id='+id; This javascript object creates the QueryString like index.php?delete_id=any_value
and the rest of work is php if the querystring is set the selected row will be deleted using following php condition.