I have a list from query that populate checkboxes (checked) in a form.
However, when a user deselects some of the items from, I want them to be deleted from the database for that user.
Here is the ex: this is how the form looks like:
Category
Item 80 626
1. HS # 1 (87) chk chk
2. HS #2 (59) chk chk
This is the list of items already n their preferences (db ids)
80|87, 626|87, 80|59, 626|59
Now from a form, if they deselect one of the items (80|87), I want it to be deleted from the database.
Like these, DELETE FROM ITEMS_TBL WHERE ITEM_ID = 80, Category_ID = 87
How can we do it? Can we check ListContains or something else?