Assign jquery value to php variable
<p>In same page i set the jquery value while click the button. i want pass the value to php variable in same page without form submitting.</p>

<pre><code>&lt;input type="button" name="next"  class="next btn btn-primary" value="Proceed To Checkout Page" /&gt;
</code></pre>

<p>Jquery</p>

<pre><code>$(".next").click(function(){
       &lt;?php $var1="1";?&gt;
 }
</code></pre>

<p>While check the php value </p>

<pre><code>&lt;?php if(isset($var1)){
     echo $var1;
 }else{
    echo "NULL";
   }?&gt;
</code></pre>

<p>Every time time i got the null value. Where i getting mistake. 
Ps: I cant able to send the ajax call to get the value</p>