query("UPDATE students SET blackboard=blackboard+1 WHERE mnumber=" . trim($_POST['mnumber'])); block("lightgreen", "added blackboard"); } if ($db->query("SELECT COUNT(*) FROM students")->fetch(PDO::FETCH_NUM)[0] == 0) { block("red", "no students registered"); break; } block("black", "add blackboard"); ?>
query("SELECT firstname, lastname, mnumber, blackboard FROM students"); print "" . $student['firstname'] . " | "; print "" . $student['lastname'] . " | "; print "" . $student['mnumber'] . " | "; print "" . $student['blackboard'] . " | "; print "