Checkbox checked values from many-to-many table

Hello everyone!

In my web app, I have a products CRUD. The products can have a lot of categories, for this, I created a many-to-many table with category_id and product_id. I was able to record the categories selected (with checkboxes) to the database (thanks for @ben post), but I can’t figure out how to show the selected categories with checked checkboxes on update form.

Any tip?

Thanks!

Community Page
Last updated: