<html>
<head>
</head>
<body>
<form name="edad.php" method="post">
(*)nombre <input type="text" name="nombre">
<br>
(*)cedula <input type="text" name="cedula">
<br>
(*)edad <input type="text" name="edad">
<br>
<input type="submit" name="boton1" value="ingresar dato">
</from>
<?php
if(($nombre=="")||($cedula="")||($edad=""))
{
if($edad>=18 && $edad<=30)
{
echo " tienes la edad suficiente para registrarse";
}
else
{
echo "no tienes la edad sificiente para registrarse";
}
}
else
{
echo "los campos marcados con(*) son obligatorios ";
}
?>
</body>
</html>
<head>
</head>
<body>
<form name="edad.php" method="post">
(*)nombre <input type="text" name="nombre">
<br>
(*)cedula <input type="text" name="cedula">
<br>
(*)edad <input type="text" name="edad">
<br>
<input type="submit" name="boton1" value="ingresar dato">
</from>
<?php
if(($nombre=="")||($cedula="")||($edad=""))
{
if($edad>=18 && $edad<=30)
{
echo " tienes la edad suficiente para registrarse";
}
else
{
echo "no tienes la edad sificiente para registrarse";
}
}
else
{
echo "los campos marcados con(*) son obligatorios ";
}
?>
</body>
</html>
No hay comentarios:
Publicar un comentario