This is the wrong forum for this.
However its quite simple basically add the data into the database depending on what database your using you may have built in functions for PHP or require ODBC.
A loop more than likely a while() loop it seems to be most popular.
To add data you will use
INSERT
to edit
UPDATE
to delete
DELETE
and to display
SELECT
If you havent done anything with SQL or PHP id suggest looking at some tutorials for PHP there are some very good beginner ones at http://spoono.com as well as here.