Insert Geolocation when submitting a PHP form to MySQL database.

Job ID: 40409895

Budget: $10 – $50 USD

I already have a functioning PHP-MySQL form whose submit button correctly writes the posted fields into the database. What I now need is a clean addition to the existing code so that, at the very same moment a record is inserted, two extra pieces of data are silently slipped into that query:

• The user’s precise latitude and longitude, obtained through the browser’s built-in Geolocation API (Using Google Chrome)
• The browser details string (user-agent) for basic device context

Everything has to stay inside the PHP codebase—no external dashboards or plug-ins—while still relying on the front-end’s permissioned call to navigator.geolocation to fetch the coordinates before the form posts.

If you’ve tackled similar geo-tagging tasks before, that experience will help us move fast.