3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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 "Грешно потребителско име или парола."; } } ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0