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í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
}
?>