include_once 'connectDB.php';
if (isset($_POST['entry'])) {
$login = $_POST['login'];
$sql = $pdo->prepare("SELECT login, password FROM dataname WHERE login=?");
$sql->execute([$login]);
$data = $sql->fetch();
if (password_verify($_POST['password'], $data['password'])) {
echo 'YES';
}
else {
echo 'NO';
}
}