title: Distinguish between missing and an unchecked checkbox
body: <p>I was under the impression that the server code (or at least PHP) that parses the POST of an HTML form cannot distinguish between a POST from a form with a checkbox whose value is not "checked" versus a POST from a form that doesn't include a checkbox by that name at all. </p>
  
  <p>For example, take the following 3 forms.  If they were all submitted as is, with no manual entry, just using the inital values, then forms f2 and f3 would send the same results:</p>
  
  <pre><code>&lt;form name="f1"&gt;
  &lt;input type="text" name="txt_1" value="Hello"&gt;
  &lt;input type="checkbox" name="chk_1" checked="checked"&gt;
  &lt;/form&gt;
  
  &lt;form name="f2"&gt;
  &lt;input type="text" name="txt_1" value="Hello"&gt;
  &lt;input type="checkbox" name="chk_1"&gt;
  &lt;/form&gt;
  
  &lt;form name="f3"&gt;
  &lt;input type="text" name="txt_1" value="Hello"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>In my real application, I'm submitting forms of the type f3, with a checkbox deliberately omitted (different checkboxes in different situations).   For any checkbox I left missing, I wanted the back-end to just ignore it -- don't treat it as On or Off, just do nothing related to that field.</p>
  
  <p>After I built it, I was almost going to throw out my work before testing, when I remembered that the back-end would treat a missing chk_1 exactly like it would an existing chk_1 that was unchecked -- and would turn Off the related value in the back-end. </p>
  
  <p>But I went and tried it out, and IT WORKED!  And I tried different variations, and they all work.  They correctly disregard the fields related to missing checkboxes (while processing the fields related to existing checkboxes).</p>
  
  <p>So, that's great, but I don't know how it's done (or whether it might stop working -- say on another browser, etc.).  In PHP, I know that the code  isset($_POST['chk_1']) will get the value of the checkbox, and it returns false in both cases:  unchecked checkbox or missing checkbox. Is there a way in other server languages to distinguish?  Why is this working?</p>