I have a register where I store the product registration date. However I need to exclude these products after 5 days registered in the database. I tried to use PHP
with the following code:
$dataExcluir = mktime(null,null,null,date('m'),date('d') + 5,date('Y'),null);
while($jm = mysqli_fetch_object($sql)){
$data = date($jm->DataCadastro,$dataExcluir);
echo $data."<br>";
}
But it does not work, that is, it is not 5 days ahead, but I put it in PHP itself:
date('Y-m-d',$dataExcluir);
Would anyone know how to solve this?