jrobles Posted April 3, 2010 Share Posted April 3, 2010 I'm working on a moble site designed for iphones and I need to be able to capture location coordinates using the iphones gps. i found a script that can get me the coordinates but I am not sure how to take these coordinates and place them in php vars so i can enter them into the database here is the code used to get the current location: <script> navigator.geolocation.getCurrentPosition(foundLocation, noLocation); function foundLocation(position) { var lat = position.coords.latitude; var long = position.coords.longitude; alert('Found location: ' + lat + ', ' + long); } function noLocation() { alert('Could not find location'); } </script> any suggestions on getting this script to talk to php? Quote Link to comment Share on other sites More sharing options...
Rustywolf Posted April 3, 2010 Share Posted April 3, 2010 i would say using AJAX http://w3schools.com/ajax/ can helkp you get started. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.