I got a simple login script that post the password and check the corrispondence with the database
session_start();
include 'core/config.php';
include 'core/db.php';
$checkPWD = $DB_CON -> query('SELECT * FROM users');
$checkPWD->execute();
$pwd = $checkPWD->fetchAll();
if($_POST['password']) {
$md5pwd = md5($_POST['password']);
if($md5pwd == $pwd[2]) {
$_SESSION['login'] = 'true';
$_GET['page'] = 'dashboard';
} else {
$_GET['error'] = 'true';
}
}
This exit and got $_GET['error'] set to true. The password is stored in md5 in database.
Thanks a lot