So I’ve got a game server that creates a username and a bycrypted password and stores it in a database in mysql. Now I’m having trouble with logging in due to the code not being able to read bcrypted passwords. How do I make my code be able to read bycrypt passwords?
<?php $con = mysqli_connect("localhost", "root", "", "testrealm"); if(isset($_POST['Login'])) { $Username = $_POST['Username']; $Password = $_POST['Password']; $query = "SELECT * FROM accounts WHERE Username='$Username' AND Password='$Password'"; $result = mysqli_query($con, $query); If(mysqli_num_rows($result) == 1) { header("Location: welcome.php"); } else header("Location: denied.php"); }