I might be going in the wrong direction here, but I have tried this so far with minor results.
<form id="form1" name="form1" method="post" action="">
<select name="select_id" id="select_id">
<option value="">Select ID</option>
<?php
do {
?>
<option value="<?php echo $row_rs['id']?>"><?php echo $row_rs['name']?></option>
<?php
} while ($row_rs = mysql_fetch_assoc($rs));
$rows = mysql_num_rows($rs);
if($rows > 0) {
mysql_data_seek($rs, 0);
$row_rs = mysql_fetch_assoc($rs);
}
?>
</select>
<input name="name" type="text" value="<? echo $_POST['select_id']?>" />
<input type="submit" name="submit" id="submit" value="Submit" />
</form>
I do have the insert behavior and it inserts a record but does not insert anything into the field I have the hidden field assigned to.
What I ultimately want is for there to be 2 hidden fields. So the Select will provide the ID dynamically from table 1, and the two hidden fields will provide the Name and Image_Name.
When I tested it by just submitting to itself, the value of the hidden field was updated correctly. However not with the name associated with the id as I would like it to.
SO, how can I update the values in the hidden fields and at the same time post them to the new table? AND exchange the ID value from table 1 with the associated Name value from table 1 as well?
Any thoughts?
Thanks,
TroyD