title: keeping radio buttons checked after form submit
body: <p>I have two set of radio buttons in html form <code>button</code> and <code>button1</code>. I am using below code to </p>
  
  <p>1.keep the default value checked <strong>(<code>question1</code> for first set and <code>answer2</code> for next set)</strong> </p>
  
  <p>2.keep  user radio button selection after the form submit</p>
  
  <pre><code>&lt;div id="button_set1"&gt;
  &lt;input onClick="show_seq_lunid();" type="radio" name="button" value="Yes" &lt;?php if(isset($_POST['button']) &amp;&amp; $_POST['button'] == 'Yes')  echo ' checked="checked"';?&gt; checked /&gt;&lt;label&gt;question1&lt;/label&gt;   
  &lt;input onClick="show_list_lunid();" type="radio" name="button" value="No" &lt;?php if(isset($_POST['button']) &amp;&amp; $_POST['button'] == 'No')  echo ' checked="checked"';?&gt; /&gt;&lt;label&gt;answer1&lt;/label&gt;
  &lt;/div&gt;
  
  &lt;div id="button_set2"&gt;
  &lt;input onClick="os_hpux();" type="radio" name="button1" value="Yes" &lt;?php if(isset($_POST['button1']) &amp;&amp; $_POST['button1'] == 'Yes')  echo ' checked="checked"';?&gt; /&gt;&lt;label&gt;question2&lt;/label&gt;   
  &lt;input onClick="os_others();" type="radio" name="button1" value="No" &lt;?php if(isset($_POST['button1']) &amp;&amp; $_POST['button1'] == 'No')  echo ' checked="checked"';?&gt; checked /&gt;&lt;label&gt;answer2&lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here if i use below code, the second radio button <code>button1</code> is not  sticking on to the user selection after form submit, it changing back to its default checked state.ie <code>answer2</code>. But the first set of radio buttons work fine.
  If I remove the default <code>checked</code> option from the code, both radio buttons working fine after form submit. How can I keep the radio button checked after form submit while using <code>checked</code> default option for radios</p>