I was try use cordova plugin with framework7, can open link and coordinate to open google map, but I don’t know howto save to mysql or other database, can anyone help me to share an example of how to save coordinates to a variable to then be passed to mysql using html and php on webservice, thanks before.
A small php example. you will need to do research for more advanced level.
example : https://www.zentut.com/php-pdo/pdo-inserting-data-into-tables/
You have a database in mysql and assuming you have a table here, you can do the following.
saveGeolocation.php
<?php
$latitude = $_POST['latitude'];
$longitude = $_POST['longitude'];
//Create a connection to the database by creating a new PDO object.
$sql_insert = "INSERT INTO geolocation VALUES(".$latitude.",".$longitude.")";
//run your query .
1 Like
thank you for the share, I’ll try first