Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $nonavbar = '';
- include 'init.php';
- //include $langs . 'ar.php';
- if ($_SERVER['REQUEST_METHOD'] == 'POST'){
- $username = $_POST['user'];
- $password = $_POST['pass'];
- $hashpass = sha1($password);
- $stmt = $con -> prepare("SELECT username,password FROM user WHERE username = ? AND password = ? AND gropid = 1");
- $stmt -> execute(array($username, $password));
- $cont = $stmt -> rowCount();
- if($cont > 0){
- $_SESSION['username'] = $username;
- header('location:home.php');
- exit();
- }
- }
- ?>
- <form class="login" action="<?php echo $_SERVER['PHP_SELF']?> " method="POST">
- <h2 class="text-center">Admin login </h2>
- <input class="form-control" type="text" name="user" placeholder="username" autocomplete="off" />
- <input class="form-control" type="password" name="pass" placeholder="passowrd" autocomplete="new-passowrd" />
- <input class="btn btn-danger btn-block" type="submit" value="login" />
- </form>
- <?php
- include $temp . 'footer.php';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement