Replaced repeated database connection code with 1 include file.
Refactored reference to database connection php code.