Skip to content

Instantly share code, notes, and snippets.

@cassiompf
Created September 3, 2019 15:13
Show Gist options
  • Save cassiompf/9794c8df549d0504a29464e7b85246e1 to your computer and use it in GitHub Desktop.
Save cassiompf/9794c8df549d0504a29464e7b85246e1 to your computer and use it in GitHub Desktop.
Atividade "SolucaoLogin" do professor Edilson Palmas 03/09
<html>
<head>
<meta charset="utf-8">
<title>Site alteraSenha</title>
</head>
<body>
<?php
$var1 = $_POST["login"];
?>
<form action="salvarSenha.php" method="POST">
Login: <input type="text" name="login" value=<?php echo $var1 ?>> <br>
Senha: <input type="text" name="senha"> <br>
Confirmar Senha: <input type="text" name="conf_senha"> <br>
<button type="submit">Enviar</button>
</form>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>Site formLogin</title>
</head>
<body>
<form action="alteraSenha.php" method="POST">
Login: <input type="text" name="login"> <br>
Senha: <input type="text" name="senha"> <br>
<button type="submit">Enviar</button>
</form>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>Site salvarSenha</title>
</head>
<body>
<?php
$var1 = $_POST["senha"];
$var2 = $_POST["conf_senha"];
?>
<h1>
<?php
if ($var1 == $var2) {
echo "Senha salva";
} else {
echo "Senhas diferentes";
}
?>
</h1>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment