Well, you need:
1. Find all inputs that you want in your HTML and get their contents.
2. Put everything in an array
3. Use AJAX to pass that array to your PHP page
4. Use a foreach in PHP to insert each value in your db
If you want further help:
1. Do you use a library?
2. What do you know how to do, and what do you don't, ie what do you need examples for to continue.
Chuck Norris counted to infinity.