I have a select form
<SELECT NAME="deptid" SIZE="1" >
$result=mysql_query("select DISTINCT department, deptid from department", $db);
while ($myrow = mysql_fetch_array($result)) {
echo "<option>";
echo $myrow["department"];
echo "</option>";
}
?>"
</select>
I want the deptid to be inserted into the database, but it inserts the department instead. I need the department to be listed in the select box for clarity, but I need the id number to be inserted into the database. I have no trouble passing the deptid to another page, I just can't get it to go in the database.
Any ideas?