<a href=”delete.php?id=fileid” title=”‘filetitle'” onclick=”return confirm(\’Confirm delete of ‘filename’?\’)”>Delete</a>
This will create a prompt that comes up with “OK” or “Cancel”. This can easily be added to your site to give you an extra layer of protection against accidentally deleting your important files.
2 thoughts on “How to: Delete confirmation”
The lazy programmer’s alternative to an undo feature!
This way it’s much easier to blame it on “user error” 😉