Co robię źle? Chcę wyciągnąć hasło z bazy danych i porównać je z tym wpisanym w formularzu logowania.
<?php require_once("config.php"); $auth_host = $GLOBALS['auth_host']; $auth_user = $GLOBALS['auth_user']; $auth_pass = $GLOBALS['auth_pass']; $auth_dbase = $GLOBALS['auth_dbase']; $db = mysqli_connect($auth_host, $auth_user, $auth_pass,$auth_dbase) or die("Error " . mysqli_error($db)); $user_name = mysqli_real_escape_string($db,$_POST['name']); $user_password = mysqli_real_escape_string($db,$_POST['password']); $sql = mysqli_query($db,"SELECT * FROM account WHERE (user = '$user_name') AND banned IS NULL"); $rows= mysqli_num_rows($sql); if($rows > 0) { if(password_verify($user_password, $rows['password'])) { } else { } } else { } mysqli_close($db); ?>