This topic is locked

Geocoding / Current User Location

7/23/2018 5:01:16 PM
PHPRunner General questions
C
casvar author

Hi, Im trying to save the user location when the record is created. Also will show in the same record the map of the location where it was created.
I have 2 fields to save "Latitude" and "Longitude" (both are DOUBLE type) I have another varchar field (500) to show the user location in the map.
I have not seen any information or guide in how to store "Latitude and Longitude" on each record for further review.
Can anyone share the right way to store this info in the records?
Best regards!

C
casvar author 7/23/2018

Ok, So Im new to it, but I hope someone comes with something better.
1.- Table Where Longitude and Latitude are stored--> add page --> before process

-----------------------------------------------------------------------------



include_once("geocoding.php");
if(postvalue("a") == "gps"){

$_SESSION["curr_lat"]=postvalue("lat");

$_SESSION["curr_lng"]=postvalue("lng");

die();

}


2.- In Table Where Longitude and Longitude are stored--> add page

-----------------------------------------------------------------------------

Longitude Field -----Edit AS --- Default Value: $_SESSION["curr_lat"]

Longitude Field -----Edit AS --- Default Value: $_SESSION["curr_lng"]
Works in Chrome for PC, but it does not seem to work on Andriod. Any guess?
Thank you