title: Form input not getting through
body: <p>I am new to php (at 60 years old I am converting from years of VBScript and ASP) and having difficulties with form handling. I have searched this and many other forums for a solution and cannot find one. I am trying to delete a record using input from a form;</p>
  
  <p>My form code ($row[0] is the field ID, which auto increments and in this instance has a value of 3):-</p>
  
  <pre><code> &lt;form action="&lt;?=$_SERVER[ 'PHP_SELF' ] ?&gt;" method="post"&gt;
   &lt;input type="hidden" name="id" value="&lt;?php echo $row[0]?&gt;"&gt;
   &lt;input type="submit" value="Delete"&gt;&lt;/form&gt;
  </code></pre>
  
  <p>The handling page then runs without producing any errors, but the record is not deleted, so I tested the input value on the handling page and the reason appears to be because the value of the variable "id" is not getting through.</p>
  
  <p>I tested the input value on the form page with:</p>
  
  <pre><code>echo $row[0]
  </code></pre>
  
  <p>and it definitely outputs the integer 3.</p>
  
  <p>The problem manifests on the handling page, and my code for checking that I have received the form input is:</p>
  
  <pre><code>$id = (INT)$_post['id'];
  echo 'Form input= ', $_post['id'], '&lt;br&gt;';
  echo '$id= ', $id, '&lt;br&gt;';
  </code></pre>
  
  <p>which displays a blank space for the form input line
  and 0 as the value for $id, when both should display the number 3</p>
  
  <p>Can anyone tell me why the value for "id" is not getting sent to the handling page?</p>
  
  <p>I expect the answer is simple but I cannot grasp it.</p>
  
  <p>I hope I have explained the problem satisfactorily but if not, please let me know.</p>