print $result;
}
}
else {
$result = $db->query("SELECT students.firstname, students.lastname, students.mnumber, workdone.manydone, workdone.thisdone FROM workdone, students WHERE workdone.session = $sessionid AND workdone.mnumber = students.mnumber");
print $result;
}
}
else {
$result = $db->query("SELECT students.firstname, students.lastname, students.mnumber, workdone.manydone, workdone.thisdone FROM workdone, students WHERE workdone.session = $sessionid AND workdone.mnumber = students.mnumber");