Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/02/2015, 20:46
Avatar de zetahosting
zetahosting
 
Fecha de Ingreso: octubre-2011
Mensajes: 119
Antigüedad: 12 años, 7 meses
Puntos: 2
Respuesta: Como mostrar mensaje de alerta segun la fecha de pago ?

Creo que te complicas mucho.

lo mas simple para chequear fechas es hacer lo siguiente:

HOY ES 26/02/2015, SUPONGAMOS QUE LA FECHA DE PAGO ES 01/03/2015

Código PHP:
Ver original
  1. $fecha_db=strtotime($rowAlertaPago['fecha_pago2']); //timesamp  
  2. $tres_dias=((60*60)*24)*3; //tres dias
  3. $dia_de_alerta=date('d-m-Y', ($fecha_db-$tres_dias)); //que día me debe hacer el alerta
  4. $fecha_hoy=date('d-m-Y');
  5.  
  6.  
  7. //dia de alerta
  8. if($dia_de_alerta==$fecha_hoy)
  9. {
  10. //FUNCION ENVIAR E-MAIL
  11. }
__________________
Excelente WebHosting -> www.zetahosting.net
[email protected]
Twitter: @zetahosting