PHP/Javascript Question
Posted: Wed Jul 16, 2008 11:43 am
I am using a Google Maps API to calculate the distance between two addresses. Unfortunately, I need to do this in a loop for several thousand to/from address combinations and then store the distance (miles between two addresses) into a variable and then a database. My issue is getting the Javascript variable into the PHP variable over and over without refreshing the page (passing it through a form or URL).
Hopefully I am explaining my issue clearly. Below is the basic idea.
I have looked all over th einternet. Any help or ideas would be awesome.
Thanks,
Adam
Hopefully I am explaining my issue clearly. Below is the basic idea.
Code: Select all
read through DB get from address
read through and process all to addresses with from address
javascript distance var = google API result (this line is echoed/embedded javascript in PHP)
place javascript distance var into PHP distance var for later iserting into DB
end read
end readThanks,
Adam