title: How to get value from onClick in PHP variable
body: <pre><code>&lt;form method="post" action="#"&gt;
  name &lt;input type="text" name="na" /&gt;
  Male &lt;input type="radio" name="r" value="Male" /&gt;
  Female &lt;input type="radio" name="r" value="FeMale" /&gt;
  &lt;input type="submit" name="sbt" onclick="return confirm('are sure');"  /&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  
  &lt;?php
  $a ="";
  if(isset($_POST['sbt']))
  {
      echo $a=
  }
  
  ?&gt;
  </code></pre>
  
  <p>I want to get value true or false from ONCLICK function in $a variable of PHP.</p>