Radio buttons turn on when the property "checked" is included, and in a list box, the property selected is indicated with the word "selected."
It gets a little complex, I do it as follows myself (which is not to say its the only way):
Radio buttons (assuming there is two, one for each sex):
<?
if($Gender == "male") {
$checkedValueMale = " checked";
} elseif($Gender == "female") {
$checkedValueFemale = " checked";
}
?>
<input type="radio" name="Gender" value="male"<? echo($checkedValueMale); ?>>
<input type="radio" name="Gender" value="female"<? echo($checkedValueFemale); ?>>
Thus, the value determines which radio button is checked. If you use the $checkedValueMale or $checkedValueFemale multiple times in your page, make sure you unset them before each use.
Lists are a bit more complicated, and requires the original values to be either in a recordset from a database or in an array.
<?
var $listValues = array("Red","Green","Yellow");
?>
<select name="color">
<?
for($i=0;$i<count($listValues);$i++) {
$selectValue = "";
if($color == $listValues[$i]) $selectValue = " selected";
echo("<option value=\"$listValues[$i]\"$selectValue>$listValues[$i]</option>\n");
}
?>
</select>
If the color selected on the prior page ($color) is equal to the specific element in the array, it gets selected.
HTH, they both work fine for me,
Jim