Ok, well assume that you have a normal html form. I am assuming that you are entering the information in by hand, correct? I can see 2 different ways to accomplish this. However if you only want 1 form submission, then I see only 1 easy way.
The most basic is to have a form that accepts your input for a single student and you click "submit" and it takes your input from the form, and sends it to the database, then returning you to the same form you were just in. You would repeat this until all the grades were entered for each student.
<?PHP
// Type 1
if (isset($actionflag) && $actionflag == "set")
{
//loop to send into db
}
<body>
<form name="form" action="<?PHP $PHP_SELF ?>">
<input type="hidden" name="actionflag" value="set"
<input type="text" name="studentid" value="">
<input type="text" name="studentgrade" value="">
<input type="submit" value="Submit"
</form>
</body>
The 1 form submission I would envision is to have all of your fields listed, and 1 submit button. Clicking the submit would send your code to a php script that would take your fields and loop through them. If you have the same amount of students each time, this could be done.
<input type="text" name="form[student1id]" value="">
<input type="text" name="form[student1grade]" value="">
This would allow you to sumbit the whole form[] array and parse through it in a loop, adding it to the db.
Hope this helps,
John