aprompt1971
Programmer
I have a form on a page with some checkboxes (the name of each checkbox is the same). The checkboxes are retrieved from a database (Access & ASP) so there might be one or many checkboxes depending on which page the user is on. The value of the checkbox is the ID of the record.
I want the user to select whichever checkboxes they like and on the next page I want to use their selection as the WHERE clause or filter to retrieve data from another table where the ID number being passed is equal to a field in the table.
So currently someone clicks two from a possible four checkboxes and the ID numbers of the two they selected are 16 and 18. On the next page I can retrieve their selection via Request.Querystring and I get an array of 16,18. I can split that array so then I've got ID(0) = 16 and ID(1) = 18 but how do I retrieve from the database the two records whose ID is 16 and 18.
I'm not too good at writing my own recordsets I usually use the Dreamweaver recordset so I'm only used to filtering my recordsets by a single passed variable or cookie.
Sorry if I've not explained that too well, basically i need to say to the database return all records where the ID is equal to X, Y and Z (where XYZ are in an array and there might be just one ID (i.e. X) or there might be many.
Many thanks.
I want the user to select whichever checkboxes they like and on the next page I want to use their selection as the WHERE clause or filter to retrieve data from another table where the ID number being passed is equal to a field in the table.
So currently someone clicks two from a possible four checkboxes and the ID numbers of the two they selected are 16 and 18. On the next page I can retrieve their selection via Request.Querystring and I get an array of 16,18. I can split that array so then I've got ID(0) = 16 and ID(1) = 18 but how do I retrieve from the database the two records whose ID is 16 and 18.
I'm not too good at writing my own recordsets I usually use the Dreamweaver recordset so I'm only used to filtering my recordsets by a single passed variable or cookie.
Sorry if I've not explained that too well, basically i need to say to the database return all records where the ID is equal to X, Y and Z (where XYZ are in an array and there might be just one ID (i.e. X) or there might be many.
Many thanks.