SQL, PHP Config, and Optimization

Migrated files. Created config file for php globals. SQL database +
integration have been implemented.