I think you could probably use the MySQLi insert server behavior and bind the values to the post fields as array values and manually code a for loop around it to loop through all of the values.
It is just a little too complex for me to do in a forum post. I'll give you 50% off a premier ticket to get it done since I want to help.