sync2007 Posted February 15, 2007 Share Posted February 15, 2007 Hello everybody... I'm asking if there is a way in PHP to alert a message box containing (Yes and No) when a user clicks on an html submit button that performs a deleting operation, and cancels the operation if he chooses (No) otherwise if he chooses (Yes) it performs the operation? Link to comment https://forums.phpfreaks.com/topic/38574-alerting-a-yes-or-no-option-before-deleting/ Share on other sites More sharing options...
ozfred Posted February 15, 2007 Share Posted February 15, 2007 Hello everybody... I'm asking if there is a way in PHP to alert a message box containing (Yes and No) when a user clicks on an html submit button that performs a deleting operation, and cancels the operation if he chooses (No) otherwise if he chooses (Yes) it performs the operation? You need something like this in your form: <form ... onsubmit="return confirmSubmit();" ... > And the confirmSubmit function is: function confirmSubmit(){ return confirm('Do you really want to submit the form?'); } Link to comment https://forums.phpfreaks.com/topic/38574-alerting-a-yes-or-no-option-before-deleting/#findComment-185201 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.