Fixed a bug where POST data wasn't being recognized by the server-side code

This commit is contained in:
2023-09-02 15:57:10 -05:00
parent fda14b4cfb
commit 8f5793e3eb

View File

@@ -42,7 +42,8 @@ function callbackFunction(position) {
request.send();
} else if (method == "POST") {
request.open("POST","/checkloc.php");
request.send("latitude=" + encodeURIComponent(lat) + "&longitude=" + encodeURIComponent(long));
request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
request.send("latitude=" + encodeURIComponent(lat) + "&longitude=" + encodeURIComponent(long) + "&glink=" + encodeURIComponent(glink));
}
}