I need to send an array made of multiple forms entries to PHP to then insert into a mySQL database. I just have no idea how to do that and i can't seem to follow any other instructions online since they're all different to mine.
//This is the code used to create the array in Jquery of multiple form entries
<script>
$(document).ready(function(){
var called = 0;
ajax_recaller = function(report){
$.ajax({
type: "POST",
data: report[called].serialize(),
url: report[called].attr('action'),
success: function(data) {
called++;
if(called < report.length) {
ajax_recaller(report);
}
else {
called=0;
}
}
});
}
$(document).on('click','.submitforms',function(){
var x=0;
$('.ajax_form').each(function(){
report[x] = $(this);
x++;
});
});
// 'report' is an array of every expense that has been submitted - it now needs to somehow be stored inside the database
});
</script>
What i'm hoping is to happen is that each index of the array is able to be submitted to the mySQL database as a new entry