title: remember user checked boxes populated from db
body: <p>I have a form with several check boxes populated from a db</p>
  
  <p><em><strong>CODE:</em></strong></p>
  
  <pre><code>// populating Checkboxes from db
      echo '&lt;div&gt;
          &lt;label for="'.$n['eName'].'"&gt;'.$n['eName'].'&lt;/label&gt;
          &lt;input type="checkbox" name="skills[]" id="'.$n['eName'].'" value="'.$n['id'].'" '.(isset($_POST[$n['eName']]) ? 'checked="checked"' : '') .' /&gt;
      &lt;/div&gt;';
  </code></pre>
  
  <p>The problem is when the user select some of these check-boxes and submit the form and get error, the form can not remember his choices and he has to re-select them again.</p>
  
  <p>what can I do to go over this issue?</p>
  
  <p>Thanks in advance</p>