title: PHP keep checkbox checked after submitting form
body: <p>Hi all i have a contact form and captcha is there. i want keep the check is checked after submitting the form. I posted the textbox values and it showing correctly but checkbox is not working. here is my code.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org /TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;form action = "" name="frmSubmit" method="post"&gt;
  &lt;input type="checkbox" name="txtCheck" value="&lt;?php echo $_POST['txtCheck'];?&gt;"  /&gt;&lt;br /&gt;
  &lt;label&gt;Name&lt;/label&gt;&lt;br /&gt;
  &lt;input type="text" name="txtName" id="NameTextBox" value="&lt;?php echo $_POST['txtName']; ?&gt;" /&gt;
  &lt;br /&gt;
  &lt;label&gt;E Mail&lt;/label&gt;&lt;br /&gt;
   &lt;input type="text" name="txtEmail" id="EmailTextBox" value="&lt;?php  echo $_POST['txtEmail'];?&gt;" /&gt;
   &lt;input name="BtnSubmit" type="submit" onclick="MM_validateForm('NameTextBox','','R','EmailTextBox','','R');return document.MM_returnValue" value="Send" /&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How to keep check box after submitting the form.?</p>