* * 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. */ session_start(); require_once('../includes/config.php'); $conn = new PDO( "mysql:host=$db_host;dbname=$db_schema;charset=utf8", $db_user, $db_pass, $db_opts ); $query = $conn->query('SELECT user, pass FROM admin'); while ($row = $query->fetch()) { $adminid = Trim($row['user']); $password = Trim($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