How to get coordinate from a google map and put the lat/long into a form?

Hi all,

Just like the one from, users can click on
the google map and save the location to the database.

the examples google gives are about how to display, it seem not to
cover what i want.

does anyone have some example or know some tutorial to help me do

thank you.