I am working in a form, but Im wondering if I can actually after the form is submitted I can re-populate a radio button and a selection option in my form? This is how my code looks like right now but I dont have any implementation for this...
<form method="post" action="forms-part3.php">
<table>
<tr>
<th colspan="2">FSOSS Registration</th>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td class="right text">Title:</td>
<td><input type="radio" name="sex" value="male">Mr.</td></tr>
<tr><td></td><td><input type="radio" name="sex" value="female">Mrs.</td></tr>
<tr><td></td><td><input type="radio" name="sex" value="female">Ms.</td>
</tr>
<tr>
And this is the drop down selection part...
<tr>
<td class="right text">T-shirt Size:</td>
<td>
<select name="selection"><?php
$menu = array("-Enter T-Shirt Size-", "Small", "Medium", "Large", "X-Large", "Do not want a t-shirt");
$count = count($menu);
for($i = 0; $i < $count; $i++)
{
?><option><?php if (isset($menu[$i])){ echo $menu[$i]; }?></option><?php
}
?></select></td>
</tr>
Sorry, I forgot to say that Im doing my form to reappear with all the fields re-populated with the user entered.. So, I got how to it for text fields but Im not sure how to do it for radio and select options.. So after the user inputs whatever his choice is, the form will re-populate the fields and also re-select the radio and options selected..