Want to store value to database from interface which has two tables

I am working on the form which has many section and ultimately many fields so had to create 2 table.

Table 1 has field id, name, address, phone,etc

Id is acting as primary key.

Table 2 is acting as foreign key.

Table 2 has field with marks in maths, geography, physics, chemistry etc.

I am done with the configuration part.

I want to store the value to database once form is submitted. Can anyone help me with it. Thanks.

 Discussion posts and replies are publicly visible