Ver Mensaje Individual
  #10 (permalink)  
Antiguo 03/12/2006, 11:09
gazuzax
 
Fecha de Ingreso: septiembre-2006
Mensajes: 196
Antigüedad: 17 años, 7 meses
Puntos: 0
No hay caso :-(

david_M_G probe tambien tu solucion pero no se pq no me funciona niguna, esta todo bien y aun asi no me reconoce la condicion, quizas debo debo cambiar algo de php.ini???

ayudenme porfavor les dejo aki mi un pequño script de prueba, me avisan si les funciona o que estoy haciendo mal

1.php
Código:
<html>
<head>
<title>1</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>&nbsp;</p>
<form name="form1" method="post" action="2.php">
  Fecha 
  <input type="text" name="date" value="2006-12-01">
  Sigan el formato para probarlo (000-00-00) 
  <input type="submit" name="Submit" value="probar">
</form>
<p>&nbsp; </p>
</body>
</html>
2.php (aqui tengo las dos soluciones que me dieron, solo comentan una y descomentan la otra para probarlas)
Código:
<html>
<head>
<title>2</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
                      <?
$date = $_POST["date"];
$actual = date("Y-m-d");


//FORMA1
if ($date < $actual-(24*3600)) 	
{
	echo"Ingrese una fecha valida";
}
else
{
	echo"Continuó a else";
}

/*
//FORMA2
$hoy=explode("-",$actual);
$fecha_ing=explode("-",$date);
if($hoy[0]<$fecha_ing[0] || $hoy[1]<$fecha_ing[1] || $hoy[2]<$fecha_ing[2])
{
	echo"Ingrese una fecha valida";
}
else
{
	echo"Continuó a else";
}
*/
?>
</body>
</html>
SALU2

Quest acabo de ver tu mensaje, lo prbare enseguida