I have a code that I get with PHP registered students in my bank, and I make a for it to have 1 form for each student. Each form has its button submit, which takes you to the AJAX function to serialize form.
This is my form's tag (which is within PHP's for
f)
<form method="post" enctype="multipart/form-data" action="#" id="form1" class="form">
Submit it
<button onclick="saveAluno(); return false" class="btn btn-block btn-primary">
and this is my AJAX to serialize
function saveAluno(){
var data1 = $('.form').serialize();
console.log(data1);
$.post("controller/setters/addAlunoRotina.php", $('#form1').serialize(), function (response) {
alert("Salvo com sucesso!");
}); }
This way it is serializing all the forms together, all at once. Is there any way I can serialize one by one of these forms?
This is an image of my system forms, so maybe it is easier to understand the problem;