- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.24
- Parse error: syntax error, unexpected '}' in /in/D127V on line 25
Process exited with code 255.
<?php
if ($_POST) {
$username = trim($_POST['username']);
$password = $_POST[password];
$get = "SELECT * FROM `users` WHERE username=" . $username . "";
if ($result = mysqli_query($con, $get)) {
while ($row = mysqli_fetch_assoc($result)) {
$hash = $row['password'];
if (password_verify($password, $hash)) {
echo 'Valid';
} else {
echo 'Invalid';
}
}
}
if ($chek > 0) {
$_SESSION['logged'] = $username;
echo "Вие влязохте успешно.";
echo '<meta http-equiv="refresh" content="1;url=index.php"> ';
} else {
echo "Грешно потребителско име или парола.";
}
}
}
?>