<?php
$login = '$2y$10$GX.GV4XG6h9Uhjq/0sxzwOmNd3C1B5x8eLszMP8PU1go7ujZ91NWK';
$haslo = '$2y$10$Vp0Nq6kFvnQqK70XKcCEJebuS41/gR1YbLcc9iwfoJvm8ZQh2YqEm';
?>
$inputlogin = $_POST['login'];
$inputhaslo = $_POST['haslo'];
if(password_verify($inputlogin, $login) && password_verify($inputhaslo, $haslo)){
$_SESSION['zalogowany'] = true;
unset($_SESSION['blad']);
header('Location: system.php');
}
else{
$_SESSION['blad'] = '<span style="color:red">Nieprawidłowy login lub hasło!</span>';
header('Location: index.php');
}
To co widzicie w kodzie to poprawny przykład haszowania?