PDA

View Full Version : Processing dynamic checkboxes



mak2204
09-25-2006, 01:22 PM
I am working in ASP and Access database.

I have a page with a form, inside the form there is a SELECT statement that pulls all relevent 'yes/no' columns from all relevent tables in the db and makes them checkboxes inside the form.

Now when i check or uncheck these boxes and submit them i need to have the db updated with all the relevent changes in all the various tables.

How can this be done? maybe there is a "FOR EACH CHECKBOX.." statement that can be used?

Any help would be appreciated.

Thanks, Mak.

djr33
09-26-2006, 08:47 AM
db updated with all the relevent changes in all the various tables.
I'm not sure what you mean.
Either:

1. You want only elements selected by a checkbox next to them to be added--
Use if statements. if checkbox=checked...

2. You want to add the values of a series of checkboxes. Just add them all in... no reason not to update the "irrelevant" ones too, since that's not changing anything. You could put some ifs in, but that might be complex.

mak2204
09-27-2006, 09:16 AM
heres something that might make things more clear:

http://www.makstudios.co.uk/screenshot/check.gif


Basically i want to update multiple columns in one row in multiple tables using checkboxes. The values will only be True or False.

Thanks.

djr33
09-27-2006, 09:28 AM
Ok, I think I understand now.
However, I use php, not asp.
This sounds pretty easy, though I can't tell you exactly how to do it.
At first, I thought it was more complex, so I was trying to help with strategies, not exact code.