Preciso de ajuda com esses erros , pois não consigo identificá-lo
Está sendo chamado aqui!
-> form class=“form-signin” method=“POST” action =“admauthentication.php”
-> input type=“text” id=“inputEmail” class=“form-control” name=“user” placeholder=“USUÁRIO” required autofocus
-> input type=“password” id=“inputPassword” class=“form-control” name=“senha” placeholder=“SENHA” required
Notice: Undefined index: user in /opt/lampp/htdocs/teste/admauthentication.php on line 24
Notice: Undefined index: senha in /opt/lampp/htdocs/teste/admauthentication.php on line 25
(CÓDIGO PHP)
<title>Autenticando Adm</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/normalize.min.css">
<script type="text/javascript">
function loginsuccessfully() {
setTimeout("window.location.href='admpainel.php'");
}
function loginfailed() {
setTimeout("window.location.href='login.php'", 5000);
}
</script>
</head>
<body>
<body>
<?php
**$user=$_POST ['user'];**
** $pass=$_POST ['senha'];**
function Comparacao()
{
if ($user==="admin" && $pass==="admin") {
echo "<script>loginsuccessfully</script>";
} else {
echo <<<HTML
<html lang="en">
<head>
<title>Login falho</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-responsive.min.css">
<!--
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script> -->
</head>
<body>
<div class="container">
<h2><center>Alerta</center></h2>
<div class="alert alert-danger">
<strong><h2>ERRO!</h2></strong> <h2>Usuário ou senha inválido, por favor aguarde um instante.</h2>
</div>
</div>
</body>
</html>
HTML;
echo "<script>loginfailed()</script>";
}
}
?>
</body>
</html>
</body>
</html>