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
Page 1 of 1
How to link to Google Maps from records in Database creating address links that link to Google maps
#2
Posted 26 September 2007 - 10:05 AM
Hi,
you can do it using Custom format on the "View as" settings dialog on the Visual Editor tab.
Here is a sample code:
you can do it using Custom format on the "View as" settings dialog on the Visual Editor tab.
Here is a sample code:
Quote
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>";
$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>";
#3
Posted 29 September 2007 - 05:34 AM
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!
Thank You!
Jane, on Sep 26 2007, 05:05 AM, said:
Hi,
you can do it using Custom format on the "View as" settings dialog on the Visual Editor tab.
Here is a sample code:
you can do it using Custom format on the "View as" settings dialog on the Visual Editor tab.
Here is a sample code:
Quote
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>";
$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>";
Page 1 of 1

Sign In
Register
Help
This topic is locked

MultiQuote