Post different data to what is show in a html select input
Posted: Fri Mar 12, 2010 4:00 pm
I have a drop down list stored in a database, but when the user submits data I need to submit the id of the record, not the actual value or I will have duplicative data
Example:
I know this could be done with ajax by updating a hidden fieild when the value of the select is changed, but i dont what to use ajax.
Thanks for your help
Lewis
Example:
Code: Select all
//fetch array code etc.
//while loop {
echo "<option>$array['name']</option>"; //show the option list
//what I want to submit is the $array['id'] of the name they selected.
}
Thanks for your help
Lewis