I’m making a small game project with a leaderboard table.
I’m trying to get the leaderboard from a mysql database to display using jQuery ajax and PHP but its giving me an error message.
My syntax seems to look fine so I’m not sure what the problem is.
$("#leader-btn").click(function() {
$.ajax({
type: "GET",
url: "leaderboard.php",
dataType: "html",
success: function(response) {
$("#leaderboard-box").html(response);
$("#leaderboard-box").css("display","block");
}
});
});