title: How to use POST and GET method in the same page, and pass all variables to next page by pressing button?
body: <p>In current code, I have POST and GET method on the same php page(delivery.php) as shown below.
  What I would like to achieve is that passing following items1-5 to next page(payment.php) by pressing button (Go to payment page).</p>
  
  <p>item1; request (this is coming from previous page)<br>
  item2; name (user's input)<br>
  item3; shippingfee (shown in span tag in the code, and this is the value returned back from shipping.php by GET method)<br>
  item4; address(user's input)<br>
  item5; email(user's input)  </p>
  
  <p>How can I achieve that?</p>
  
  <p>delivery.php</p>
  
  <pre><code>&lt;?php
    $request = $_POST['request'];
  ?&gt;
  
  &lt;html&gt;
  ....
    &lt;form name="aaa" method="POST" action="payment.php"&gt;
      &lt;input name="name"&gt;&lt;/input&gt;
    &lt;/form&gt;
    &lt;form name="bbb" method="GET" action="shipping.php"&gt;
      &lt;select id="country" name="countryshipping"&gt;
        &lt;option value="null" select="selected"&gt;default&lt;/option&gt;
        &lt;option value="1"&gt;1&lt;/option&gt;
        &lt;option value="2"&gt;2&lt;/option&gt;
      &lt;/select&gt;
    &lt;/form&gt;
    &lt;form name="ccc" method="POST" action="payment.php"&gt;
      &lt;input name="address"&gt;&lt;/input&gt;
      &lt;input name="email"&gt;&lt;/input&gt;
    &lt;/form&gt;
    ....
    &lt;div&gt;
      &lt;span id="shippingfee"&gt;&lt;/span&gt;
    &lt;/div&gt;
    ....
    &lt;form ????????&gt;
      &lt;button type="submit"&gt;Go to payment page&lt;/button&gt;
    &lt;/form&gt;
    ....
  </code></pre>
  
  <hr>
  
  <p>Solution</p>
  
  <p>I could manage to achieve what I wanted to do. Sharing my code:</p>
  
  <p>delivery.php</p>
  
  <pre><code>&lt;?php
    $request = $_POST['request'];
  ?&gt;
  
  &lt;html&gt;
  ....
    &lt;form name="aaa" method="POST" action="payment.php"&gt;
      &lt;input name="name"&gt;&lt;/input&gt;
      &lt;select id="country" name="countryshipping"&gt;
        &lt;option value="null" select="selected"&gt;default&lt;/option&gt;
        &lt;option value="1"&gt;1&lt;/option&gt;
        &lt;option value="2"&gt;2&lt;/option&gt;
      &lt;/select&gt;
      &lt;input name="address"&gt;&lt;/input&gt;
      &lt;input name="email"&gt;&lt;/input&gt;
    &lt;/form&gt;
    ....
    &lt;div&gt;
      &lt;input type="hidden" name="shippingfee" id="shippingfee2"&gt;&lt;span id="shippingfee"&gt;&lt;/span&gt;
    &lt;/div&gt;
    ....
      &lt;button type="submit"&gt;Go to payment page&lt;/button&gt;
    &lt;/form&gt;
    ....
  </code></pre>
  
  <p>Payment.php</p>
  
  <pre><code>&lt;?php
  $name = $_POST['name'];
  $country = $_POST['countryshipping'];
  $address = $_POST['address'];
  $email = $_POST['email'];
  $shippingfee = $_POST['shippingfee'];
  ?&gt;
  </code></pre>
  
  <p>In addition to above codes, I added one line in jQuery   </p>
  
  <pre><code>document.getElementById("totalfees2").value = value; // "this value is the same value which is stored in id="shippingfee""
  </code></pre>