We formulate the resource allocation problem for the uplink in code division multiple access (CDMA) networks using a game theoretic framework, propose an efficient and distributed algorithm for a joint rate and power allocation, and show that the proposed algorithm converges to the unique Nash equilibrium (NE) of the game. Our choice for the utility function enables each user to adapt its transmit power and throughput to its channel. Due to users' selfish behavior, the output of the game (its NE) may not be a desirable one. To avoid such cases, we use pricing to control each user's behavior, and analytically show that similar to the no-pricing case, our pricing-based algorithm converges to the unique NE of the game, at which, each user achieves its target signal-to-interference-plus-noise ratio (SINR). We also extend our distributed resource allocation scheme to multi-cell environments for base station assignment. Simulation results confirm that our algorithm is computationally efficient and its signalling overhead is low. In particular, we will show that in addition to its ability to attain the required QoS of users, our scheme achieves better fairness in allocating resources and can significantly reduce transmit power as compared to existing schemes.