PHP: Show yes/no confirmation dialog


Question

My PHP page has a link to delete one MySQL table datum. I want it to be in such a way that when I click the 'delete' link a confirmation box should appear and it should ask "are you sure, you want to delete?", with two buttons: 'yes' and 'no'. When I click yes, I want to delete the MySQL table's data and when I click no, nothing should happen.

1
18
1/10/2012 3:27:11 PM

<a href="http://stackoverflow.com" 
    onclick="return confirm('Are you sure?');">My Link</a>
50
8/6/2009 11:41:04 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon