prepare("SELECT id, username, password FROM users WHERE username = ?"); $stmt->bind_param("s", $username); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows === 1) { $user = $result->fetch_assoc(); if (password_verify($password, $user["password"])) { $_SESSION["username"] = $user["username"]; header("Location: home.php"); exit; } else { $error = "Wrong Username or Password."; } } else { $error = "Username not found."; } } ?> Hit or Run — Sign In

Hit or Run

$error

"; ?>
Belum punya akun? Sign Up!