title: Remembering Form Checkbox State With Initial Default Value
body: <p>I've got a form with a checkbox. When a user first visits the page, I want the checkbox to be 'checked'. However, if they uncheck the box and then submit the page, I want it to remain unchecked (and to remain checked if they submit the page with it checked).</p>
  
  <p>To determine when it has been checked and the form submitted, I'm currently doing:</p>
  
  <pre><code>&lt;input type='checkbox' class='seeAll' name='seeAll' value='true' &lt;?php if ($_POST['seeAll'] == 'true') echo checked; ?&gt;&gt;
  </code></pre>
  
  <p>This works great for leaving the box checked when needed, however, how would I go about ensuring it stays unchecked if they submit it that way, while also being checked if they revisit the page (such as by re-entering the URL)?</p>
  
  <p>Thanks!</p>