I want to make a form where the user can select the different level he wants to work on (around 30). It's a form to set a test, like this the user selects all the different levels in want to work on in the test.
So my first question is, is there any way faster to do than using a switch for every single 30 checkbox to verify if it has been checked or not ?
And then, I would like to make an SQL request that select in the 'level' column only levels that has been checked previously. I was wondering if i can put all the values of checked checkbox in an array, and then use '''SELECT * FROM table WHERE level IN (myArray[])''' ?
I hope my question is clear, let me know if you need me to clarify.
Aucun commentaire:
Enregistrer un commentaire