I want to use geolocation in my phpwebsite. So what have I done. Users can add information like name, STREET, HOUSENUMBER, ... to a database. This information is clearly stored in the database. If people look for a place with the searchfunction they receive a list of places they searched for. On every founded place at the list, users can click on en they receive a more detailed page about a specific place(record). In this page there has to be geolocation. I already used google and I discovered i need to convert the adress to a lattidude/longitude. This lattitude and longitude must be added to the database but i don't know at what moment (already in the add function, after in a seperate function) and how am i going to do this. At this moment i have a function that calculate the longitude and latitude. I stored them into 2 variables, in javascript but now i'm stuck. Here you see the code i already have.