I have been tasked with creating a page that allows logged in users to view a list of job options attached to their record and if they wish, uncheck items and check others, then submit the list.
We use ASP VB.script pages and are pulling data from a proprietary AMS system.
The items making up the list (40 options, in this case) come from one table in the database (we'll call it tbl_codes), with the data in the table being option ID, option description and some other fields. What users have selected are kept in another table (we'll call this tbl_codes_select), with the data in the table being a row ID, a user ID, and a option ID (nvarchar, 16 characters for some reason), along with some other fields.
What I would like to put together is some kind of code that dynamically reads the option table and generates a list of check boxes, one for each option, with the correct checkboxes checked based on the info in the codes_select table.
I initially put together a static table with each radio box dynamically checking it's corollary field in the codes_select table, but then it occurred to me that this will get very cumbersome as we add other options at a later date (I was also stumped by a single user having multiple options), so I began thinking of an array, but I have no clue how to put one together for this particular project.
The second half of this (to be asked once this part is solved to try to max out the points) is once the checkbox list is displayed, how do I craft the update statement?