Case: I tried to implement via js a geolocation tracker (not an IP Tracker). The code snippet is under Divi > Integration > Body Tag (Divi Page Builder). Afterwars i build via PhpMyAdmin a table which colums i need like visitor_id, visitor_lat, visitor_lng etc.
Question: How do i put the data i get via my js snippet into my data base table gps_tracker?
What i know: I know that i have to use some php to put some data into my db. I read about ajax, jquery and so on but got confused, which to choose.
Question 2: Lets say i have the php code to put the gps location into my table, where to i write the php code, in the child theme functions.php or in a separate file where i upload later to my host?
One of many Goals: In the end i want to build a map, which visitor location shows up and my truck location. So i can calculate the distance in minutes. So the visitor would know i will be in 20 minutes in his place.
Tried to build something like this:
But like mentioned, do not really know where place the code. Maybe creating and uploading the files in WEBFTP?
Also it would be really nice, if someone can give advice how to start with php progamming regards wordpress, especially, retrieving data and putting data into DB.
Regards,