BRAD'S MAPPY EMAIL SIGNUP
I wanted a quick and easy way to ask website visitors for their email addresses and locations. This does that via Google Maps. You can see an example of it in action at: http://www.bradsucks.net/live/
SCRIPT REQUIREMENTS
- jQuery
- PHP 4+
- MySQL
INSTALLATION
- Get a Google Maps API key: http://code.google.com/apis/maps/signup.html
- Fill out the variables in map-config.php
- Create the map-table.sql table
- Upload the files to your web host
- Visit index.php for an example implementation
You can then include the map selector in any PHP page:
<? include "map-selector.php"; ?>
EXTRAS
- You can specify $mapButtonText before including map-selector.php:
$mapButtonText = "add me"; // changes the submit button text to "add me";
- If your URL has an email variable in it, the email input box will not be displayed but that email will be passed through. Example:
http://www.yourhost.com/map/index.php?email=user@email.com
In this instance only a submit button will be displayed beneath the map, but user@email.com address will be saved along with the location.
CAVEATS
There's no error checking or location updating. Whatever people click and enter gets added to the database table.
SUPPORT
I can't offer email support of this script (no time) but you can ask your questions in the Brad Sucks BFF forums and I'll do my best to answer:
http://www.bradsucks.net/forums/
Thanks!
Brad