I am currently working on an enrollment website for our research project. How to assign the section of a student where the course is "Computer Programming" limited to 50 per section? I currently have this but don't know what to do:
$course= $_POST[course];
$section= "Kindness";
$query2 = "SELECT * from students WHERE Specialization= 'Computer Programming'";
mysqli_query($conn,$query2);
$row = mysql_fetch_assoc($query2);
if($row['Specialization'] == $course){
$query3 = "INSERT INTO students (Section) VALUES ('$section')";
mysqli_query($conn,$query2);
}
}