I hope you are all having a wonderful day so far. I have a question in regards to PHP and MYSQL Login page that I created. It seems to be not working. Thank you for the help in advance.
<?php
$db = mysqli_connect("localhost", "root", "", "test");
if (isset($_POST['login'])) {
$username = mysqli_real_escape_string($db,$_POST['username']);
$password = mysqli_real_escape_string($db,$_POST['password']);
$query = "SELECT * FROM users WHERE Username='$username' AND Password='$password'";
$result = mysqli_query($db,$query);
$count = mysqli_num_rows($result);
if($count == 1) {
session_register("username");
header('location: home.html');
}else {
echo "Your Login Name or Password is invalid. Please try again.";
} }?>