How to post values from multiple drop down menus in the same form
I have a form with a unique identifier for each row in the form. in each
row I also have a drop down menu with user names.
basicly each row has a task and next to each task a drop down menu with
name of the task owner. what I need to do is to be able to POST the user
name along with their task id so I can update the owner of the task in one
submit.
so let say the following is what I have
ID Title MENU
1 Tast 1 (please select)
2 Tast 2 (please select)
3 Tast 3 (please select)
if the user selected "Mike" in row 1 then I want to update the database
with the Mike's ID which is Mike's option value in the drop down menu.
The thing that I am having a diffecuty with in trying to link each menu to
the correct row id "task id". this is how my menu code is displaied
<select name="user_id[]">
<option value="200">Mike</option>
<option value="205">Jaylen</option>
<option value="220"> Jack</option>
</select>
I want to be able to link each menu to the correct task id so when I post
the form I can link each menu to the correct row.
How can I include the task id in each menu?
Thanks
No comments:
Post a Comment