I have a dropdown list full of states that I read from an array into the list.
<?
while (list($abbrev, $name)=each($states)) {
printf("<option %s value=\"%s\">%s</option>\n", ($state) ? 'selected="selected"' : '', $abbrev, $name);
}
?>
My question is that when I select a state and submit my form, all of my options are selected, and the list display's only the last option, not the actually selected option. If anyone has any ideas or suggestions, they would be greatly appreciated!