Well, that seems a little complicated to me, being a newbie, but to do an insert in MySQL isn't too complicated. Assuming you know how to connect to the database already, here's the basics:
$insert = "insert into My_Table (column_name1, column_name2)
values ('value1','value2')";
$result = mysql_query($insert)
or die("Error inserting values into My_Table table.");
If you are looking to extract the data into values, I'm not the best at doing this, but I'd explore using the explode() function, combined with array_shift().
Hope this helps...