This topic is locked
[SOLVED]

 How to link to Google Maps from records in Database

9/26/2007 2:38:27 AM
PHPRunner General questions
R
runnerPHP2008 author

I have users enter addresses into a MYSQL database.

When other people view these addresses in the "list View" I want to create a link that dynamically pulls up a Google Map based on that record.
Any ideas?
I am collecting, Street_address, City, State, Zip

J
Jane 9/26/2007

Hi,
you can do it using Custom format on the "View as" settings dialog on the Visual Editor tab.

Here is a sample code:

global $data;

$value = "<a target=_blank href=\"http://maps.google.com/?ie=UTF8&hl=en&q=".$data["Street_address"]."; ".$data["City"]." ".$data["State"]." ".$data["Zip"]."\">google map</a>";

R
runnerPHP2008 author 9/29/2007

Ok, and what if I wanted to make a anything entered into a particular field, like "Store_Name" become a clickable link in the listview that goes to that records website address. Website address is collected in a field called "website_address"
Thank You!

Hi,

you can do it using Custom format on the "View as" settings dialog on the Visual Editor tab.

Here is a sample code: