I have two drop down menus populated with values from a database using the following code for both (changed names and variables...):
<xmp>
<TR>
<TD><B>State:</B><BR>
<SELECT NAME="statename[]">
<?php
$prod = mysql_query("SELECT * FROM state", $db);
while ($data2 = mysql_fetch_array($prod)) {
printf("<OPTION VALUE=\"%s\">%s</OPTION>\n", $data2[stateID], $data2[statename])
;
}
?>
</SELECT></TD></TR>
</xmp>
now, on this same page I check for the presence of $submit from the form at the top, and if it exists passes the info to my database. the problem I am having is the selection from the two dropdown menus are not being passed to the database.
other drop down menus where I have actually written the HTML into the page work just fine.
How do I need to alter the script to allow the selection from my two menus to be passed to the dbase with the rest of the information?