* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License in GPL.txt for more details. */ // PHP <5.5 compatibility require_once('../includes/password.php'); session_start(); require_once ('../config.php'); $con = mysqli_connect($dbhost, $dbuser, $dbpassword, $dbname); if (mysqli_connect_errno()) { $sql_error = mysqli_connect_error(); die("Unable connect to database"); } $query = "SELECT * FROM admin"; $result = mysqli_query($con,$query); while($row = mysqli_fetch_array($result)) { $adminid = Trim($row['user']); $password = $row['pass']; } if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($adminid == htmlentities(trim($_POST['username']))) { if (password_verify($_POST['password'], $password)) { header("Location: dashboard.php"); $_SESSION['login'] = true; } else { $msg = '
Wrong User/Password
'; } } else { $msg = '
Wrong User/Password
'; } } ?> Paste - Login

Paste