CodeIgniter Forums
Multiple Dropdowns - Unique Values? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Multiple Dropdowns - Unique Values? (/showthread.php?tid=44447)



Multiple Dropdowns - Unique Values? - El Forum - 08-15-2011

[eluser]chandlerou[/eluser]
I have a form that a user will be filling out. They will be assigning users to positions i.e. (Matt is frontend, John is backend, Eric is Database, etc...). My initial GUI for this (Since the positions are static and the users dynamic, was to have just a dropdown list of users for each position.

Therein lies the issue.

How can I accomplish this, if only one user can work only one position?

I have the job ID and user ID as a compound key ensuring only one user can work one position per job, so when something like the image is inserted into the database, only the first inserted instance is there.