title: PHP & HTML : PHP GET Function Won't Detect POST Method HTML Form Attribute Value
body: <p><strong>Case :</strong></p>
  
  <p>Hi all, actually i use POST and GET method in many times and they're work fine. But this time it isn't. I use POST TYPE form and then do PHP While (Looping) to generate some HTML attribute, i also give name to these HTML attribute (like input field etc). But second script (different page name), just won't detect it. It's like im using 1.php (where POST method applied) and 2.php (where GET method applied).</p>
  
  <p><strong>Experiment :</strong></p>
  
  <p>My experiment with code is like this basically (just to show logic, not the actual code).</p>
  
  <p><strong>1.php</strong></p>
  
  <pre><code>&lt;?php
  echo &lt;form method="POST" action="2.php"&gt;
  while (fetch) {
  echo fetch
  }
  echo &lt;/form&gt;
  ?&gt;
  </code></pre>
  
  <p><strong>2.php</strong></p>
  
  <pre><code>&lt;?php
  $x = $GET['id'] // work fine
  $x = $GET['html_attribute'] // result : unidentified index
  $query = update tbl_transaction set x='$x' where id='$id' 
  $query -&gt; execute();
  ?&gt;
  </code></pre>
  
  <p><strong>Real Code of 2.php</strong></p>
  
  <pre><code>&lt;?php 
  include 'config/user_session.php';
  include 'config/config.php';
  
  if(isset($_GET['id']))
  {
  $id=$_GET['id'];
  $no_ref=$_GET['no_ref'];
  $desc=$_GET['desc'];
  $amount=$_GET['amount'];
  $via=$_GET['slPayment'];
  $date=$_GET['date'];
  $cat=$_GET['cat'];
  $subcat=$_GET['subcat'];
  
  $query1=mysql_query("update tbl_transaksi set no_ref='$no_ref', desc='$desc', amount='$amount', via='$via', date='$date', cat='$cat', subcat='$cat' where id='$id'");
  if($query1)
  {
  echo '&lt;script language="javascript"&gt;';
  echo 'alert("Transaction Edited.")';
  echo '&lt;/script&gt;';
  echo "&lt;script&gt;setTimeout(\"location.href = 'edit_transaction.php';\",100 &lt;/script&gt;";
  }
  }
  ?&gt;
  </code></pre>
  
  <p>I tried to change GET with POST, the result still same. Unidentified Index.</p>
  
  <p><strong>Desired Output :</strong></p>
  
  <p>I want 2.php GET Function return value from 1.php attribute value. Form method already POST.</p>
  
  <p>Where did i do wrong ? What code i should modify ? </p>
  
  <p><strong>Thank you Stackoverflow Community.</strong></p>