This topic is locked

How to write GPS coordinates to database

12/16/2018 12:26:08 PM
PHPRunner General questions
U
ustunsoz author

I am getting Latitude and Longitude with following code onthe page as display. How can I asign this values into the field instead of displaying

if (navigator.geolocation) {

navigator.geolocation.getCurrentPosition(showPosition);

}

function showPosition(position) {

alert("Latitude: " + position.coords.latitude +

" Longitude: " + position.coords.longitude);