The following code is used to insert mysql with a foreach
foreach ($puntosVisita as $nombre) {
echo $nombre;
mysqli_query($bd, "INSERT INTO puntosVisita (idRuta, nombre, fechaMod) VALUES ('$consecutivo', '$nombre', '$fechaMod')") or die(mysqli_error($bd));
}
only records the first value of the array in the database, the problem is that it saves them with id = 0, how can I solve it ?, attached image of the base fields