Menu
I am updating a SQL league table based on match scores. I am trying to send the teams and current score to php for processing. Any help appreciated. This is what I have so far:
“`
document.getElementById(“Home1Goals”).innerText = 0;
document.getElementById(“Away1Goals”).innerText = 0;
$(document).on(“click”, “#Week1Game1Start”, function() {
$.ajax({
method: “POST”,
url: “Operations.php”,
data: {
“Week1Game1Home”: “Home1Goals”,
“Week1Game1Away”: “Away1Goals”
},
dataType: “json”,
success: function(data) {
var result = JSON.parse(data);
alert(parsedJSON.canApprove);
if (data.statusCode == 200) {
alert(‘success’);
}
}
});
});