Existence results for elliptic problems with gradient terms via a priori estimates