I am able to set the value of a text field from a php variable so that when the page is refreshed, the text field remains filled in like so:
<td><input type="text" name="user" value="<?php echo ($_REQUEST['user']); ?>" /></td>
However, I would like to do the same for a radio button with a different variable, $gender
. How could I do this?
<td><input type="radio" name="gender" value="male"> Male<br>
<input type="radio" name="gender" value="female"> Female<br>
<input type="radio" name="gender" value="other"> Other</td>
</div>