(and please forgive me for asking such a basic question)
My MySQL database contains location information, and I have a PHP script that allows users to add new locations to the database. After adding a new location, I want to immediately calculate the distances between this location and a selected group of existing locations in the database using a Google Maps directions request, and then save these distances in the database.
I know how to retrieve the subset of locations using PHP and fetch distance data with JavaScript from Google Maps. However, I'm unsure about how to transfer these JavaScript variables to my database. What is the most effective way to store a collection of JavaScript variables as individual entries in a MySQL database?
Appreciate your assistance!
Carl