Before you begin, note that you should generally put your database connection information in a separate file. This is a good idea whenever you’re using PHP to access a database, as it keeps confidential information in a file that you won’t be tempted to share. In the Maps API forum, we’ve occasionally had people accidentally publish their database connection information when they were just trying to debug their XML-outputting code.
Google Code FAQ - Geocoding Addresses with PHP/MySQL (emphasis mine) - Er, oops.