title: Storing checkbox values in sessions and then re-selecting check boxes checked when they came back to add some more
body: <p>I am trying to pass my checkbox values through a session variable if the user goes back by clicking  add more books link. I want to show them previously selected check boxes are checked. I tried in chklist.php page </p>
  
  <pre><code>if(isset($_SESSION['pro'])){ 
  echo  $_SESSION['pro'];} 
  </code></pre>
  
  <p>shows values like 1_2_5 which are  present in session array.
  Here is my html code of checkboxes. I have about 24 checkboxes with the same name as product[].</p>
  
  <pre><code>&lt;name="product[]"  type="checkbox" value="1" alt="1607.00" /&gt;
  &lt;name="product[]"  type="checkbox" value="2" alt="1607.00" /&gt;
  </code></pre>
  
  <p>and so on
  Here I am setting my session after POST of checkboxes .</p>
  
  <pre><code>$_SESSION['pro'] = implode('_', $_POST['product']); 
  </code></pre>
  
  <p>in nextpage chkout.php.
  How to make previously selected  checkboxes are checked when user came back to firstpage(chklist.php) by clicking  ADD MORE BOOKS link present in chkout.php, can any body write the code what i need add to my html.   </p>