What is wrong with this PHP HTML form coding?

Tj B

New member
I am attempting to use this code:

<select class=\"element select medium\" name =\"fresult[Martial_status]\" size=\"0\">";
while (list($key, $val) = each($Marital)) {
$form .= "<option value=\"" . $val . "\"";

if ($fresult[Marital_Status] == $val) {
$form .= " selected";
}

$form .= ">$key</option>";
}
$form .= "
</select>


I set the array and it displays all properly on the website, but it does not save the chosen item if the form is submitted??

Any help?
 
Back
Top