I don't know your database structure, but I'm assuming you want to have the main record ID when you insert into the images table, so you would have two inserts, but you would insert the main table data first and then insert the images after once you have the ID from the main table.
Yes you could do multiple inserts in this way, but it would require some hand coding in both javascript and php to pull off.