Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/04/2006, 10:20
AmericoFox
 
Fecha de Ingreso: marzo-2006
Mensajes: 16
Antigüedad: 18 años
Puntos: 0
Re

Hola, Colocare aqui el codigo correcto:

[-] form.html:
<body>
<form action="proceso.php" method="post">
Usuario: <input name="txtUsuario" type="text" />
Clave: <input name="txtClave" type="text" />
<input name="btnSubmit" type="submit" value="Validar" />
</form>
</body>
[-] proceso.php:
<?php
if(!strlen($_POST["txtUsuario"])) die("Ingrese un Usuario Valido");
if(!strlen($_POST["txtClave"])) die("Ingrese una Clave Valida");
if(($_POST["txtUsuario"]=="admin") and ($_POST["txtClave"]=="123"))
{
echo "Acceso Concedido";
echo "<form action=proceso.php method=post>";
echo "<input type=submit name=btnAgregar value=Agregar>";
echo "<input type=hidden name=txtUsuario value=admin>";
echo "<input type=hidden name=txtClave value=123>";
echo "</form>";
}
else
{
die("Acceso Denegado");
}
?>
Saludos

Última edición por AmericoFox; 01/04/2006 a las 10:27