Ver Mensaje Individual
  #9 (permalink)  
Antiguo 08/07/2015, 12:56
Avatar de xfxstudios
xfxstudios
 
Fecha de Ingreso: junio-2015
Ubicación: Valencia - Venezuela
Mensajes: 2.448
Antigüedad: 8 años, 10 meses
Puntos: 263
Respuesta: Problemas para trabajar con fechas en PHP

Prueba asi, a mi me arrojo un resultado positivo y creo que es lo que quieres:
resultado:
Cita:
2015-07-08-Contrato Vigente
2015-07-05-Contrato vencido
codigo:
Código PHP:
Ver original
  1. while($row = mysqli_fetch_array($result))
  2. {
  3.     if($row['fecha'] < date("Y-m-d")) {
  4.         $msg = "Contrato vencido";
  5.     }
  6.     else {
  7.         $msg = "Contrato Vigente";
  8.     }
  9.     echo $row['fecha']."-".$msg."<br>";
  10. }