title: How to save checkbox status after form is submitted
body: <p>I have a PHP code to display table data with a column of checkboxes used to click to mark the test case as Blocked. I am trying to save the state of checkbox after it is submitted, but I am unable to do so.
  Please help!</p>
  
  <pre><code>echo "&lt;form id=\"checkbox\" class=\"check2\" method = \"post\" action=\"\"&gt;";
  $checked = "";
  if(isset($_POST['Blocked[]'])) {
  $checked = 'checked="checked"';
  }
  echo "&lt;td $Blocked&gt;&lt;input type =\"checkbox\" name=\"Blocked[]\" value=\"checkblock\"         onclick=\"showMsg('div1')\" $checked/&gt;&lt;/td&gt;";             
  echo "&lt;input type=\"submit\" value=\"Submit\" class=\"button\" name=\"edit_tc\" onclick=\"myFunction(form)\" style=\"position:fixed; height:25px ; width:150px; bottom:25px; right:200px;\"/&gt;";
  echo "&lt;/form&gt;";
  </code></pre>