Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'server/db.php';
- session_start();
- $login = $_POST['login'];
- $senha = $_POST['senha'];
- $resultado = mysqli_query($conexacao, "SELECT `nome`, `pass` FROM `admins` WHERE `nome` = '$login' and `pass` = '$senha'");
- if(mysqli_num_rows ($resultado) > 0 ){
- $_SESSION['login'] = $login;
- $_SESSION['senha'] = $senha;
- header('location:sistema.php');
- } else {
- unset ($_SESSION['login']);
- unset ($_SESSION['senha']);
- header('location:index.php');
- }
- ?>
Add Comment
Please, Sign In to add comment