added config.inc.php and set up database connection with error checking. 

added some basic index.php stuff and inluded the config files.