completed basic level of db integration.
updated php to reflect db field name changes.