Suppose that $S\subset R$ is a multiplicative set in $R$, where $R$ is a commutative ring with identity $1\neq 0$. Prove that the homomorphism $\phi:R\to S^{-1}R$ is injective if and only if $S$ contains no zero-divisors.
I have an idea about how to approach this question, but I am not sure exactly how to structure it. For one direction, where we assume $\phi$ is injective, this means that $\ker(\phi)=\{0\}$, which I think means that there are no zero divisors in $R$, so there are no zero divisors in $S$ because it is a subset of $R$? Am I headed in the right direction?
Edit: I believe this question is different than the one it is marked as duplicate to, because that question uses the concept of monomorphisms which are not mentioned here.