Check boxes are often used in web forms, so how to use PHP to determine which check boxes are selected in the submitted form and read the data in them.
First create a form: form.html
Then create a program to process the form: checkbox.php
This can be displayed in the form of an array, which ones are selected. The display result is similar to: Array( [0]=7 [1]=15 )
But the above program is only used to display whether the check box is normal. If you take out all the data in the array one by one, you need to use a loop.
So further modify the program to: checkbox.php
The result of this execution is similar to:
I believe it will be much more convenient to execute other statements specifically in the next step.