在PHP和MySql中使用HTML5 Geolocation

I'm building a web application for a University project which requires the use of PHP and MySql. I'm planning on using HTML5 Geolocation to ask access to a logged in users location on a form. Once they have accepted and submitted the form I would like the location information to be stored in a MySql database and then recalled on another page in the form of a Google Map with a pin in the area where the form was submitted.

I've had a search around but can't find any conclusive evidence to suggest that this would be a viable way of doing it. So my question is is this (relatively) simple to do and more importantly is it a reliable way of capturing data about a users location?

The idea is that a user would use the application in order to report problems in their area, for example a pothole. A user can log in and report the problem and the location by allowing the use of Geolocation. The problem is then recorded on a 'problem' page, where the council can look and see where it was reported from.

Any tips would be great!

Well its accuracy varies greatly. Sometimes it can be pinpointed to a few meters and other times be off a couple of kilometers. This detection is based on networks and trace routing for the most part, and as such you can never guarantee complete accuracy.

I would recommend using addresses for your project. Google can easily project pins on addresses, plus that's likely what the city will be using internally.

This is a very reasonable way to do it. Check out the google maps example: https://google-developers.appspot.com/maps/documentation/javascript/examples/map-geolocation