title: Unable to determine why I am unable to update a record with php?
body: <p>Using PDO I am attempting to update a particular database record via a form that is in part created by php. However, when I hit the submit button the page redirects to . </p>
  
  <p>The Relevent Controller function: </p>
  
  <pre><code>public function updateRecord ($selectTable, $value) {
              include ('View/selectTable.php');
              $tableFields = $this-&gt;db-&gt;getTableFields ($selectTable); 
              $results = $this-&gt;db-&gt;getRecord($selectTable, $value);  
              echo $_POST['saveContactForm'];
              include '/View/updateRecord.php';   
  
  
          }
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>&lt;form class="form-horizontal" method="POST" id= "saveContactForm"&gt;
      &lt;?php for ($a = 1; $a &lt; count ($tableFields); $a++):?&gt;
          &lt;div class="form-group"&gt;
              &lt;label class="col-sm-2 control-label" for=" &lt;?php echo $tableFields [$a] ?&gt;"&gt;&lt;?php echo $tableFields [$a]  ?&gt;&lt;/label&gt;
              &lt;div class="col-sm-10"&gt;
                  &lt;input type="text" class="form-control" id="&lt;?php echo $tableFields[$a] ?&gt;" placeholder="&lt;?php echo $results[0][$tableFields[$a]] ?&gt;"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;?php endfor ?&gt;
      &lt;input type ="submit" class ="btn btn-primary"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I am not getting error or warnings. However, I did discover that regardless of where I put the echo $_POST['saveContactForm'] I am unable to get the post variables. </p>