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.
<ul>
<?php foreach($companyStatus as $statuses => $status): ?>
<li>
<input
type="radio"
value="<?php echo $url?>"
name="group1"
onclick="if(this.checked){window.location=this.value;}"
><?php echo htmlspecialchars($status['fldStatusName'])?>
</li>
<?php endforeach;?>
</ul>