You can:Group the forms into one, and send the data as arrays.Or avoid sending the forms separately, grouping your data and making a single shipment.The first option is easy, the second one requires a little more preparation. I see the first one more natural, and I understand it's really what you need, and what you were looking for when you painted the three forms.It would be like this:In the HTML, you put a single form, and the input names challenge them to send arrays: <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<form id="form" method="post">
<table>
<tr>
<td>
<input type="date" id="fechaActual1" name="fechaActual[1]" value="">
<input type="number" name="salidas[1]">
<input type="number" name="paradas[1]">
</td>
</tr>
<tr>
<td>
<input type="date" id="fechaActual2" name="fechaActual[2]" value="">
<input type="number" name="salidas[2]">
<input type="number" name="paradas[2]">
</td>
</tr>
<tr>
<td>
<input type="date" id="fechaActual3" name="fechaActual[3]" value="">
<input type="number" name="salidas[3]">
<input type="number" name="paradas[3]">
</td>
</tr>
</table>
<div>
<input type="submit" id="both" value="Submit Both Forms">
</div>
</form>
Notes:I fixed your table (for example, the cells were missing).I have added name to the elements dateUpdate, and a number to the id to distinguish them.I changed your button to type "submit", but you can do it as you prefer.Your form lacks action property, it is advisable to put it.When you submit the form, you will receive this from PHP as a $_POST Account:array(
'fechaActual' => array(
1 => '[valor de fechaActual1]',
2 => '[valor de fechaActual2]',
3 => '[valor de fechaActual3]',
),
'salidas' => array(
1 => '[valor de salidas1]',
2 => '[valor de salidas2]',
3 => '[valor de salidas3]',
),
'paradas' => array(
1 => '[valor de paradas1]',
2 => '[valor de paradas2]',
3 => '[valor de paradas3]',
),
);
So it's easy to get them back and work with them.However, if you prefer to receive the data with a more affable structure in the array, you can paint the inputs like this (atento a los name): <input type="date" id="fechaActual1" name="datos[1][fechaActual]" value="">
<input type="number" name="datos[1][salidas]">
<input type="number" name="datos[1][paradas]">
I've put only those corresponding to set 1, for 2 and 3 you just have to put the corresponding number.And at $_POST['datos'] in PHP you will receive an array where each element will be a (sub)array with the 'dateNew', 'outside' and 'stop' elements. I mean, very easy to treat. I leave it for you