Saving various lines of data in database

I need a form with multiple lines of student grades and codes and I want to save this data so that each student’s grade is inserted in one row in the database.
Is there any way to organize the form and save them instantly to the database?
How to organize the form and what methods do it in cakephp 2.6?

in form:
student code = 1 school discipline = 1 grade = 9
student code = 2 school discipline = 1 grade = 7
student code = 3 school discipline = 1 grade = 8

and want to insert all lines in a database…