Localization of ring by using homomorphism

If $\phi : A \to B$ is a ring homomorphism, where $A$ and $B$ are commutative rings with unit but not necessarily domains. Let $P$ be a prime ideal of $A$. How do we define the ring $B_{P}$ and map $\phi_{P} : A_{P} \to B_{P}$? Thanks

-

It is natural to define $\varphi_P(a/s)=\varphi(a)/\varphi(s)$, for $a\in A$ and $s\in A-P$. This also suggest what $B_P$ should be, that is, the ring of fractions of $B$ with respect to the multiplicative system $\varphi(A-P).$ So $B_P$ is a notation for this ring of fractions which, in fact, is not a localization (at a prime ideal of $B$).
A natural way is to put $B_P=A_P\otimes_A B$ and define $\phi_P: A_P\to B_P$ by tensoring $\phi$ with $A_P$: $\phi_P(a/s)=(a/s)\otimes 1$.
Edit Localization: $B_P$ is actually the localization of $B$ with respect to the multiplicative subset $\phi(A\setminus P)$ of $B$.
Thanks Qil. I am trying to write the elements of $B_{P}$ by using the definition of localization. Here $\phi(P)$ may not be a prime ideal of $B$. If not prime then $B$\ $\phi(P)$ need not be a multiplicatively closed set. Then I could not use the definition of localization. – Rajesh Dec 28 '12 at 22:54