I comment, I need the system on the days of 1
to 5
of each month to verify if people from a condominium made the payment, but to place them in default. I was researching and I believe that I date period with date interval, it is the closest thing to that function, for the moment I have the following, however, I do not do what I requested, I hope you can help me.
The date value of the pago_p
table is in date
<?php
require_once('../conexion.php');
$hoy = getdate();
$begin = new DateTime( '2018-08-01' );
$end = new DateTime( '2018-08-31' );
$interval = new DateInterval('P1M');
$daterange = new DatePeriod($begin, $interval ,$end);
foreach($daterange as $date){
$sql = "SELECT * FROM pago_p";
$res = mysqli_query($conexion,$sql);
while($resultado = mysqli_fetch_array($res)){
if(["pago"]==NULL {
echo '<script> alert("No realizaste el pago en la fecha determinada"); </script>';
}
}
?>