i have created a button to remove data from database. The button code looks like the following:
<form method="post">
<button name="remove" onclick="myFunction()" style="margin-left: -15%; border-radius: 15px;" class="button button2">Remove</button>
</form>
i have given an alert confirm box to proceed or cancel the button click.
function myFunction() {
confirm("Do you want to remove?!");
}
now after the button click, if i do cancel or if i do ok, both are executing the query. the cancel button is not cancelling the click. can anyone please tell what is wrong here.