Ver Mensaje Individual
  #7 (permalink)  
Antiguo 08/02/2012, 17:37
Avatar de Briss
Briss
 
Fecha de Ingreso: junio-2011
Mensajes: 1.293
Antigüedad: 12 años, 11 meses
Puntos: 12
Respuesta: Comparar día, mes y año

Cita:
Iniciado por andresdzphp Ver Mensaje
Para comparar los 2 tienen que estar en unix timestamp, así se compara con PHP:

Código PHP:
Ver original
  1. <?php  
  2. $fechaactual = time();
  3. $timestamp = strtotime($row_alumnos['fechacierre']);
  4.  
  5. if ($fechaactual >= $timestamp) {
  6.     echo '<img src="img/cerrado.png" width="25" height="25" border="0"  alt="" />';
  7. } else {
  8.     echo '<img src="img/abierto.png" width="25" height="25" border="0"  alt="" />';
  9. }
Mil Gracias por tu ayuda :)