Ver Mensaje Individual
  #3 (permalink)  
Antiguo 25/04/2007, 23:08
Avatar de capa
capa
 
Fecha de Ingreso: octubre-2006
Mensajes: 86
Antigüedad: 18 años, 4 meses
Puntos: 1
Re: Advertencia de tiempo transcurrido

Bien hay va.
Código PHP:
//registro
$time_res 51840000;    //(51840000 = 60 dias) tiempo restante
$time_ini time();     //registras el tiempo de inicio
//a los campos "fecha_inicio= $time_ini, fecha_termino= $time_res";
 
//consulta
$tiempo = (($fecha_inicio+$fecha_termino)-time())/3600;    //la chequeamos por una hora
$tiempo = (int)$tiempo;        //moldeamos
if($tiempo 1) {
    echo 
"ya expiro o lo que puedas ejecutar";
} else {
    echo 
"aun no expiro, falta $tiempo horas";

También la puedes ver la función time(); te ilustrar mejor.
http://www.php.net/manual/es/function.time.php
__________________
Destreza..<?phs La felicidad es un trayecto ?>