title: I have a php form dropdown menu that needs to send information
body: <p>I have a dropdown menu that is filled by a mysql database. I need to select one and have it send the information for use on the next page after clicking submit. It does populate the drop down menu like it is supposed to it just does not seem to catch the data on the next page. Here is what I have:</p>
  
  <p>removeMain.php</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;form action="remove.php" method="post"&gt;
  &lt;?php
      $link = mysql_connect('********', '********', '*********');
      if (!$link){
          die('Could not connect: ' . mysql_error());
      }
      mysql_select_db("********", $link);
      $res = mysql_query("SELECT * FROM cardLists order by cardID") or die(mysql_error()); 
      echo "&lt;select name = CardID&gt;"; 
      while($row=mysql_fetch_assoc($res)) { 
          echo "&lt;option value=$row[ID]&gt;$row[cardID]&lt;/a&gt;&lt;/option&gt;"; 
      } 
      echo "&lt;/select&gt;";
  ?&gt;
  Amount to Remove: &lt;input type="text" name="Remove" /&gt;
  &lt;input type="submit" /&gt;
  &lt;/form&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>remove.php</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;?php
  $link = mysql_connect('*********', '*********', '*********');
      if (!$link){
          die('Could not connect: ' . mysql_error());
       }
  
      mysql_select_db("***********y", $link);
  
   $query = sprintf("UPDATE cardLists SET AmountLeft = AmountLeft - %s WHERE cardID =  '%s'", mysql_real_escape_string($_POST["Remove"]), mysql_real_escape_string($_POST["CardID"]));
   mysql_query($query);
   mysql_close($link);
  ?&gt;
  &lt;br /&gt;
  &lt;a href="removeMain.php"&gt; &lt;input type="submit" name="return" id="return" value="Update More" /&gt;&lt;/a&gt;
  &lt;a href="index.php"&gt; &lt;input type="submit" name="main" id="main" value="Return To Main" /&gt;&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>