I've got a working dropdown pulling successfully from a MySQL table:
<p>Type: <select ="type"><?php
$sql = "SELECT DISTINCT type, ID FROM fd_type ORDER BY ID DESC";
$et = mysql_query($sql);
while ($row = mysql_fetch_assoc($et)) {
?>
<option value="<?php echo "$row[ID]" ?>" <?php if ($row['type'] == ($_REQUEST['type'])) echo 'selected'; ?>><?php echo $row['type'] ?></option><?php
}
?>
</select>
*</p>
And I've got a successful statement to insert data into a table field:
<p>Type: <input type="text" name="type_ID" size="25" maxlength="100" value="<?php if (isset($_POST["$et"])) echo $_POST["$et"]; ?>" />
*</p>
The dropdown shows the information, but won't insert it, while the text box inserts the information, but doesn't have a dropdown (obviously). How do I combine the two?
The table that is providing the information for the dropdowns is linked to the main table (where I want to insert the data) by a foreign key (ID in the dropdown table, type_ID in the main table).
I've been working on this all day, so my mind is blown right now. Apologies in advance for any vital information I've missed in this posting.