Gmap3 - Forum

Gmap3 exchange platform

You are not logged in.

Ads
(server costs 27.50€ per month)

#1 2012-07-05 18:19:45

trpaquette
Member
Registered: 2012-07-05
Posts: 3

Insert record into MySQL with data from Google Maps API if not exist

Hi there,

The plugin allows the user to populate a jquery autocomplete field with data from Google Maps API but I want to

1) pass the selected values to a PHP script that will insert the data from Google Maps API (city, province, country, postal code, longitude, latitude) into a local MySQL database if it does not already exist, then

2) forward the user to a URL using the 'ID' of the row which contains the inputed data values (ie, www.example.com/forward.php?city=id)

Does anyone know how to accomplish these tasks? Any help would be very much appreciate!!! Thank you in advance!!!

Offline

Ads
(server costs 27.50€ per month)

#2 2012-07-08 12:48:30

charlietfl
Moderator
Registered: 2011-11-24
Posts: 201

Re: Insert record into MySQL with data from Google Maps API if not exist

use jQuery ajax to send data to server and return the url  or id
http://api.jquery.com/category/ajax/

within ajax success callback do the redirect

Offline

Board footer

Powered by FluxBB