I've got my forms working the way I want them to, sort of. I don't want to duplicate information in the database so rather than inserting the actual information I'd like to be able to display the record to the user but store the record number of where the info was found. Can someone help me as far as what the next step should be? Here is the code that I've written to pull the information from the DB into a form and display it to the user:
$quantity_query = "SELECT quantity,qty_ID FROM qty_ID";
$result = mysql_query($quantity_query);
$num_results = mysql_num_rows($result);
echo "Standard Measurement (qty): </TD><td>";
echo "<select name=\"quantity_value\" onChange=\"MM_jumpMenu('parent',this,0)\">";
// Display all of the quantity values in the database for selection
for ($i=0; $i <= $num_results; $i++)
{
$row = mysql_fetch_array($result);
echo "<option value=$row[quantity]>";
echo ($row["quantity"]);
}
echo "</select>";
I tried using a hidden field inside the for loop like this to pass on the record number but it didn't seem to work:
echo "<input type=\"hidden\" name=\"record_qty\" value=$row[qty_ID]>";