title: I want to integrate paypal payment gateway to my application but i am not able to pass the amount variable
body: <pre><code>&lt;button type="button" &gt;total?&lt;/button&gt;
  &lt;?php $abc= '&lt;div id="output"&gt;&lt;/div&gt;';
  echo $abc;?&gt;  
  &lt;form class="paypal" action="payments.php" method="post" id="paypal_form" target="_blank" runat="server"&gt;    
      &lt;input type="hidden" name="cmd" value="_xclick" /&gt; 
      &lt;input type="hidden" name="no_note" value="1" /&gt;
      &lt;input type="hidden" name="lc" value="UK" /&gt;
      &lt;input type="hidden" name="currency_code" value="GBP" /&gt;
      &lt;input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHostedGuest" /&gt;
      &lt;input type="hidden" name="first_name" value="Customer's First Name"  /&gt;
      &lt;input type="hidden" name="last_name" value="Customer's Last Name"  /&gt;
      &lt;input type="hidden" name="payer_email" value="customer@example.com"  /&gt;
      &lt;input type="hidden" name="item_number" value="123456" / &gt;
  
      &lt;input type="submit"  value="Submit Payment"/&gt;
  &lt;/form&gt;
  
  
  
  &lt;script type='text/javascript'&gt;
  $('button').click(function() {
  
      var total = $(':checkbox:checked.case').get().reduce(function(total, checkbox) {
          return total + +checkbox.value;
      }, 0);
  
      $("#output").html(total);
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>The code contains a button that grabs the total sum from the checked answers. I need to pass this value to the payment gateway.</p>
  
  <p>Thanks in advance....</p>