title: how to keep radio button checked after page refresh?
body: <p>i have many radio buttons inside foreach loop and it's onclick it goes to it's corresponding url  . i want the selected radio button stays checked after page refresh using php or javascript. sorry for my broken english.</p>
  
  <pre><code>&lt;ul&gt;
   &lt;?php foreach($companyStatus as $statuses =&gt; $status): ?&gt;
    &lt;li&gt;
  
     &lt;input
     type="radio"
     value="&lt;?php echo $url?&gt;"
     name="group1"
     onclick="if(this.checked){window.location=this.value;}"
     &gt;&lt;?php echo htmlspecialchars($status['fldStatusName'])?&gt;
  
   &lt;/li&gt;
  &lt;?php endforeach;?&gt;
  &lt;/ul&gt;
  </code></pre>