I need the "active" state to automatically change to the "inactive" state when the current date is longer than the deadline (when it is due).
I do not have the code with me but you could help me an example.
I would appreciate a lot.
I need the "active" state to automatically change to the "inactive" state when the current date is longer than the deadline (when it is due).
I do not have the code with me but you could help me an example.
I would appreciate a lot.
$fecha_actual = strtotime(date("d-m-Y H:i:00",time()));
$fecha_limite = strtotime("20-11-2018 21:00:00");
$estado = true;
if($fecha_actual > $fecha_limite){
$estado = false;
}
Or if you prefer you can serve this:
$fecha_actual = strtotime(date("d-m-Y H:i:00",time()));
$fecha_limite = strtotime("20-11-2018 21:00:00");
$estado = "activo";
if($fecha_actual > $fecha_limite){
$estado = "inactivo";
}
I hope you get an idea