"telalogin.php"
Bootstrap 4.1.1 Snippet by rafaelduarte7

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <?php require_once 'classes/usuarios.php'; $u = new Usuario; ?> <html lang="pt-br"> <head> <meta charset="utf-8"> <title>Login</title> <link rel="stylesheet" href="css/estilo.css"> </head> <body> <div id="corpo-form"> <h1>Entrar</h1> <form method="POST"> <input type="email" placeholder="Usuário" name="email"> <input type="password" placeholder="Senha" name="senha"> <input type="submit" value="ACESSAR"> <a href="cadastrar.php">Ainda não é inscrito?<strong>Cadastre-se</strong></a> </form> </div> <?php if(isset($_POST['email'])) { $email = addslashes($_POST['email']); $senha = addslashes($_POST['senha']); if(!empty($email) && !empty($senha)) { $u->conectar("projeto_login","localhost","root",""); if($u->msgErro == "") { if($u->logar($email,$senha)) { header("location: areaPrivada.php"); } else { ?> <div class="msg-erro"> Email e/ou senha estão incorretos! </div> <?php } } else { ?> <div class="msg-erro"> <?php echo "Erro: ".$u->msgErro; ?> </div> <?php } }else { ?> <div class="msg-erro"> Preencha todos os campos! </div> <?php } } ?> </body> </html>
*{ margin: 0px; padding: 0px; } body{ background-image: url(../img/foto2.jpg); background-position: 50% 0%; color: black; font-family: arial; } input{ display: block; height: 55px; width: 400px; margin: 10px; border-radius: 30px; border:1px solid white; font-size: 16pt; padding: 5px 10px; background-color: rgba(255,255,255,0.01); color: white; outline: none; } div#corpo-form{ width: 420px; margin: 130px auto 0px auto; } div#corpo-form-Cad{ width: 420px; margin: 80px auto 0px auto; } div#corpo-form h1,div#corpo-form-Cad{ text-align: center; padding: 20px; } a{ color:white; text-decoration: none; text-align: center; display: block; } a:hover{ text-decoration: underline } input[type=submit]{ background-color: #ff0066; border: none; cursor: pointer; } ::-webkit-input-placeholder{/*webkit browsers */ color: #fff; } :-moz-placeholder {/* Mozilla Firefox 4 to 18 */ color: #fff; } ::-moz-placeholder {/* Mozilla Firefox 19+ */ color: #fff; } :-ms-input-placeholder {/* Internet Explorer 10+ */ color: #fff; } div#msg-sucesso{ width: 420px; margin: 10px auto; padding: 10px; background-color: rgba(50,205,50,.3); border: 1px solid rgb(34,139,34); } div.msg-erro{ width: 420px; margin: 10px auto; padding: 10px; background-color: rgba(250,128,114,.3); border: 1px solid rgb(165,42,42); }

Related: See More


Questions / Comments: