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

php
Aadhavan Srinivasan 1 year ago
parent fda14b4cfb
commit 8f5793e3eb

@ -42,7 +42,8 @@ function callbackFunction(position) {
request.send(); request.send();
} else if (method == "POST") { } else if (method == "POST") {
request.open("POST","/checkloc.php"); 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));
} }
} }

Loading…
Cancel
Save