PHP interface for database access