I have a page which has a form. When I click the submit button, I need to display a message prompt if continue submit or not. If the user clicks continue submit, I need to disable the submit button while the page is submitting.
The code below does not work.
<form action="action_page.php" method="post">
<button type="submit" id="subbutton" name="submit_page[]" onclick="return confirm('Are you sure of your choices?'); this.disabled=true;">Submit </button>
</form>
The code below is from my action_page.php
if(isset($_POST['submit_page'])){
}