title: Form values not posting
body: <p>I have two pages. The first one I am sending data over to the second page. The second page I am using to edit the data sent over and other data within my database. I call for the data I sent over like this:</p>
  
  <pre><code>$id = $_POST['id'];
  $first = $_POST['first'];
  $last = $_POST['last'];
  $product = $_POST['product'];
  </code></pre>
  
  <p>The issue is I have other data on the page that and whenever I edit any of this information, I want to be able to do an <code>UPDATE query</code> to save the new information. However, my query isn't working and I believe it is because my new input field's (data I didn't send over from the first page) data is not being recognized. </p>
  
  <p>Whenever I var_dump the values, I get the data (and in the same format) as how I sent it over to this page. </p>
  
  <p>Here is my code for the second page:</p>
  
  <pre><code>&lt;?php
  ini_set('display_errors', 1);
  error_reporting(E_ALL);
  
  $id = $_POST['id'];
  $first = $_POST['first'];
  $last = $_POST['last'];
  $product = $_POST['product'];
  
  $newId = filter_var($id, FILTER_SANITIZE_STRING);
  
  
  try {
      $host = 'localhost';
      $name = '';
      $user = '';
      $password = '';
  
      $dbc = new PDO("mysql:host=$host;dbname=$name", $user, $password);
  
  }catch(PDOException $e) {
      echo $e-&gt;getMessage();
  
  }
  
      $stmt = $dbc-&gt;query("SELECT * FROM users WHERE id='$newId' ");
      $stmt-&gt;setFetchMode(PDO::FETCH_ASSOC);
      //print_r($stmt);
      while($row = $stmt-&gt;fetch()) {
  
      $productAmount = $row['amount'];
      $productAvailable = $row['available'];
  
  ?&gt;
  
  &lt;form name="update" method="POST"&gt;
  &lt;input type="text" name="id" value="&lt;?php echo $newId; ?&gt;"&gt;
  &lt;input type="text" name="first" value="&lt;?php echo $first; ?&gt;"&gt;
  &lt;input type="text" name="last" value="&lt;?php echo $last; ?&gt;"&gt;
  &lt;input type="text" name="product" value="&lt;?php echo $product; ?&gt;"&gt;
  &lt;input type="text" name="amount" value="&lt;?php echo $row['amount']; ?&gt;"&gt;
  &lt;input type="text" name="available" value="&lt;?php echo $row['available']; ?&gt;"&gt;
  
  &lt;button type="submit"&gt;Update Product Information&lt;/button&gt;
  &lt;/form&gt;
  &lt;?php 
  }
  var_dump($_POST);
  
  
  if(isset($_POST['update'])) {
      $stmt = $dbc-&gt;prepare("UPDATE users SET first = ?, last = ?, product = ?, amount = ?, available = ? WHERE id = ?");
  
      $stmt-&gt;bindParam(1, $_POST['first']);
      $stmt-&gt;bindParam(2, $_POST['last']);
      $stmt-&gt;bindParam(3, $_POST['product']);
      $stmt-&gt;bindParam(4, $productAmount);
      $stmt-&gt;bindParam(5, $productAvailable);
      $stmt-&gt;bindParam(6, $newId);
  
      $stmt-&gt;execute();
  }
  
  ?&gt;
  </code></pre>
  
  <p>When I do <code>var_dump($_POST);</code> I get the following values, clearly not including the <code>amount</code> and <code>available</code> data.</p>
  
  <p><code>array(5) { ["id"]=&gt; string(1) "4" ["first"]=&gt; string(3) "Tom" ["last"]=&gt; string(5) "Brady" ["product"]=&gt; string(3) "Tea" ["edit"]=&gt; string(4) "Edit" }</code></p>
  
  <p>Why isn't all my data being recognized?</p>