database connection using php class oop approach