After validating user data from database I want to update some values in the Database using php code.
I have tried
var answer = confirm("Do you want to Checkout?");
if(answer==true)
{
<?php MY UPDATE COMMAND ?>
}
but update command execute even if answer==false
Please help me in solving my problem.
Thanks
Here are solutions for you:
1st – use AJAX. As for example with help of jQuery:
2nd – is to use links like this: