I have a form, it's to display all students in my school. Each student is displayed from a database and is shown as a checkbox - the name of the checkbox is the student ID.
On the submitted page I loop through the students table again and do this
while($row2 = $result2->fetch_assoc()){
$StudentID = $row2['StudentID '];
if ($_POST["$StudentID "] == 1){
....
To see if they are checked or not but i get this error
Notice: Undefined offset: 460 in C:\wamp64[url]www..[/url]...
What is the best way of doing this?