only close db conx at end of php script