Execute particular code on confirmation of user but confirm box must be activate during the php code not onsubmit form
<p>After validating user data from database I want to update some values in the Database using php code.</p>

<p>I have tried </p>

<pre><code>var answer = confirm("Do you want to Checkout?");
if(answer==true)
{
&lt;?php MY UPDATE COMMAND ?&gt;
}
</code></pre>

<p>but update command execute even if answer==false</p>

<p>Please help me in solving my problem.</p>

<p>Thanks</p>
