$(document).ready(function() {
$.ajax({
type: "GET",
url: "backend/get_results.php",
dataType: "json",
success: function(response) {
var tableBody = $("#resultsTableBody");
response.forEach(function(entry) {
var row = "
";
row += "" + entry.id + " | ";
row += '' + entry.file_name + ' | ';
row += "" + entry.date + " | ";
// QR Code generation and other features will be added here
row += "
";
tableBody.append(row);
});
},
error: function() {
alert("An error occurred while fetching results.");
}
});
});