| Designing and setting up a city county database lookup | | | | - State Abbreviation |
| script on your website doesn't have to be difficult. | | | | If you think you'd like to do more advanced processing |
| Using PHP and MYSQL is probably the simplest route | | | | you can find city data that includes: |
| to go since most hosting services already have them | | | | - Zip Code |
| available. For those using Windows-type hosting the | | | | - Latitude |
| basic setup would be similar but the database and | | | | - Longitude |
| scripting language will be different. | | | | Expect to pay a bit more for the extra data. Zip |
| First and foremost you need to obtain a database of | | | | codes will let you do more advanced searches |
| cities and counties for use on your website. | | | | including zip code lookups. The latitude and longitude will |
| Surprisingly, this can be the hardest part of the | | | | allow you to perform radius searches and distance |
| process if you don't know where to look. If you | | | | calculations on your data. |
| already have a database of cities and counties you | | | | Next you need to write or acquire a script to do all of |
| need to import it into a MYSQL database if you | | | | the lookups for you. For those people that don't know |
| haven't already. Everyone else will need to download a | | | | how to write PHP code or just don't want to bother |
| city county database of their own and upload it to their | | | | you can either buy a pre-made script or have |
| server. | | | | someone write it for you using a site like |
| Most databases you buy should have at least the | | | | Adding a city county database to your website will let |
| following: | | | | you tailor data to the needs of your visitors allowing |
| - City Name | | | | them to only display the information that is specific to |
| - County Name | | | | their general location. This is especially useful when |
| - State | | | | providing information for local businesses and services. |