text: Q:
  
  Default checked checkboxes not submitted
  
  I have some checkboxes on a web page, for example:
  <input type="checkbox"<?php echo $checked; ?> name="stuff[]" value="First" />
  
  where $checked is either an empty string or checked="checked" depending on what had been submitted.
  I submit the form and (assuming at least some checkboxes with the name stuff[] checked), _POST['stuff'] in PHP is an array of the values for the checked boxes, such as ('first', 'third', 'fourth').  HOWEVER, if the checkbox is pre-checked with checked="checked", the value of the box ('first' in the above example) is left out of the list of stuff values.  It is left out even if the user unchecks the box and then rechecks it.
  I want the submitted value to include all checked items including the pre-checked (and not user-unchecked) ones.  How can I do this?
  
  A:
  
  Without seeing code, I'm going to guess that checked="checked" isn't actually what's being output by the PHP code. Instead, you're probably missing a " and it's causing the rest of th element's values to be messed with.
  Instead, do this:
  <input type="checkbox" checked="<?php echo $checked; ?>" name="stuff[]" value="First" />
  
  Where $checked = checked or null (without the ")
  
  