When the user clicks the submit button, I was to pop-up a confirm box. My problem is that when he presses OK, I want to run one query. When he presses Cancel, I want to execute a different query.
Can this be achieved with only PHP and JavaScript (Not AJAX or JQuery)
If Yes, Please tell me how. Thanks.
Edit: My main problem is that if I attach the onclick function to submit button, it is executing the server side code before taking the confirmation. And I cannot add the onsubmit function to the form since I have two action items associated with this and I want this feature for only one button. Any thoughts on this?