title: Passing form values from one page to another
body: <p>In my form I am trying to pass <code>acad_id</code> to <code>academy_view.php</code> page.  After the form submits I am trying to append  <code>acad_id</code> to the url. In this way I can use <code>GET</code> in <code>academy_view.php</code> to pull up the records from mysql db. But everytime after submission the post url has an empty field for id.</p>
  
  <p>academy_create.php</p>
  
  <pre><code>$acad_id = $_POST['acad_id'];
  &lt;form action="academy_view.php?id=&lt;?php echo $acad_id; ?&gt;" method="POST"&gt;
          Name: &lt;input type="text" name="name"&gt;&lt;/br&gt;
          Academy ID: &lt;input type="text" id="acad_id" name="acad_id"&gt;&lt;/br&gt;
  &lt;input value="SAVE" name="submit" type="submit"&gt;
  &lt;/form&gt; 
  </code></pre>
  
  <p>academy_view.php</p>
  
  <pre><code>if (isset($_GET['id']) &amp;&amp; is_numeric($_GET['id']) &amp;&amp; $_GET['id'] &gt; 0){
                   // query db
              $acad_id = $_GET['id'];
  
  //Some Code
  
  }
  </code></pre>
  
  <p>After submitting the URL shows id empty: <a href="http://www.example.com/academy_view.php?id=" rel="nofollow">http://www.example.com/academy_view.php?id=</a></p>