Restringir Campos
| From: | DeltaHost Servicios Internet | Date: | Sat, 19 Jan 2002 11:16:29 +0000 |
| Subject: | Restringir Campos | ||
| Groups: | php.general.es | ||
| Request: | Send a blank email to general-es+get-18023@lists.php.net to get a copy of this message | ||
Queridos Amigos, tengo hecho un formulario en flash que envia la data a un .php con este formato.
<?
$mensaje = "Datos Depósito\n\n
Nombre y apellido: $nya\n
Fecha de Depósito: $dd / $mm / $aaaa\n
N° de Sucursal : $sucursal\n
Correo Electrónico: $correo\n
";
if($nya!=""); if($dd!=""); if($mm!=""); if($correo!="");
if($aaaa!=""); if($sucursal!=""){
mail("pagos@deltahost.com.ar", "Pagos Planes Hosting", $mensaje,
"From: $correo \nX-MAILER: PHP/" . phpversion());
echo "<html><head><META HTTP-EQUIV='REFRESH'
CONTENT=1;URL=http://www.deltahost.com.ar/gracias2.html></head></html>";
exit;
}
else {
echo "<html><head><META HTTP-EQUIV='REFRESH'
CONTENT=1;URL=http://www.deltahost.com.ar/error.html></head></html>";
exit;
}
?>
Mi problema, esta en que yo quiero que la fecha este restringida a lo siguiente.
En $dd quiero que acepte solamente los numeros entre {1-31}
En $mm solamente los numeros entre {1-12}
En $aaaa solamente los numeros entre {2002-2010} (nota: y en el 2010 se me muere el formulario,
jeje).
Espero me puedan ayudar.
Como siempre, muchas gracias por su dedicacion a mis preguntas.
Atte.
**********************************
Fernando M. Honig
DeltaHost Servicios Internet
www.deltahost.com.ar
info@deltahost.com.ar
*********************************