Ver Mensaje Individual
  #6 (permalink)  
Antiguo 08/02/2012, 13:26
Avatar de andresdzphp
andresdzphp
Colaborador
 
Fecha de Ingreso: julio-2011
Ubicación: $this->Colombia;
Mensajes: 2.749
Antigüedad: 12 años, 10 meses
Puntos: 793
Respuesta: Comparar día, mes y año

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. }
__________________
Si sabemos como leer e interpretar el manual será mucho más fácil aprender PHP. En lugar de confiar en ejemplos o copiar y pegar - PHP