Greetings, my problem is that when I insert the dates to pay for each person I must first insert the start date of the rent, then to that same date increase one month and so with the other dates. For example, the user rents the premises for 4 months, the first payment date will be 05-09-2017, then the next date will be 05-10-2017 and will increase according to the months that the rent is made. I've tried this but it does not make me the increases:
$estado=0;
$aumento = 0.2;
$aumentaCada = 3;
$concepto = 0;
for($i = $aumentaCada; $i < $repetir; $i+$aumentaCada){
if(($i>0) && ($i % $aumentaCada)==0):
$monto = $monto*(1+$aumento);
endif;
$primer = date('d-m-Y', strtotime("$primer + 30 day"));
$concepto = $concepto +1;
$query3 = "INSERT INTO
pagos_usuarios(id_inscripcion,concepto,monto,estado,fecha_a_pagar)
VALUES('$val2','$concepto','$monto','$estado','$primer')";
$sql3=$mysqli->query($query3);
}
That's how it is, but that way I do not insert anything, and it stays like an infinite bug.