Ver Mensaje Individual
  #4 (permalink)  
Antiguo 01/04/2006, 11:16
gingerk
 
Fecha de Ingreso: enero-2006
Mensajes: 140
Antigüedad: 18 años, 3 meses
Puntos: 0
pues no funciona, me dice ingrese un usuario valido, en el formulario invisible esta bien escrito la contraseña y el usuario.

Código PHP:
<?php
if(!strlen($_POST["user"])) die("Ingrese un Usuario Valido");
if(!
strlen($_POST["pass"])) die("Ingrese una Clave Valida"); 
if ((
$_POST["user"]=="admin") && ($_POST["pass"]=="123")){
//cerramos php y damos paso a html
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
etc etc etc
</body>
</html>
<?php
echo "<form action=gastos.php method=post>";
echo 
"<input type=submit name=btnAgregar value=Agregar>";
echo 
"<input type=hidden name=user value=admin>";
echo 
"<input type=hidden name=pass value=123>"
echo 
"</form>";
}
else
{
?>
<p>Usuario o contraseña incorrecto</p>
<?php
}
?>