This is the third post in my series on creating your own custom store locator map using Google maps, PHP, and XML. In this post we are going to create a simple PHP file which will be used to connect the store locator in our website to the database of store locations.
Select and copy this code:
<? $username="YOUR DATABASE USERNAME"; $password="YOUR DATABASE PASSWORD"; $database="YOUR DATABASE NAME"; ?>
Past the code into a blank text file. Simply replace the values in the code with the correct values to your database.
Save the file as databaseconnect.php or whatever you want to call it (as long as it has the .php extension). Upload the file to your server.
The next step in creating our own store locator is to create the XML file which will process the calls for store locations in a browser.