You can do in this way
$checked = $_POST['gender'];
<input type="radio" value="male" <?php if($checked=="male"){echo "checked"}; ?> > Male
<input type="radio" value="female" <?php if($checked=="female"){echo "checked"}; ?> > Female
1
solved radion button selection based on input value [closed]