I tried to insert multiple rows from one form using checkboxes, include take values from input box, all of them has the structure:
<input id="Valor" type="text" name="Valor[]" value="<?php echo $row2["Valor"]; ?>" />
and the checkbox is like:
<input type="checkbox" name="Pago[]" id="Pago" value="<?php echo $row2["IdSolicitudTarjeta"]; ?>" />
But when I'll send the form at 'insertmultiple.php' I use the following code but only shows 2 results. Don't matter how many times I tried show the rest, don't works:
foreach($_POST['Pago'] as key => $val) {
$Producto = $_POST['Producto'][$key];
$FormaPago = $_POST['FormaPago'][$key];
$FechaConsignacion = $_POST['FechaConsignacion'][$key];
$Valor = $_POST['Valor'][$key];
$Detalle = $_POST['Detalle'][$key];
$FechaRegistrar = $_POST['FechaRegistrar'][$key];
echo $Pago." -- ".$FechaConsignacion." -- ".$Producto." -- ";
echo $FormaPago." -- ".$Valor." -- ".$Detalle." -- ";
echo $FechaRegistrar."<br>";
}
please help! :(
print_r($_POST)please