Here is the problem I have:

Let $\displaystyle R$ be a PID and $\displaystyle p \in R$. Prove that the ideal $\displaystyle \langle p \rangle$ is maximal in $\displaystyle R$ if and only if $\displaystyle p$ is a prime element in $\displaystyle R$. (Recall $\displaystyle p$ is a prime in $\displaystyle R$ if $\displaystyle p$ is not a unit and if $\displaystyle p|ab$ then $\displaystyle p|a$ or $\displaystyle p|b$)

I know that prime elements generate prime ideals (and I think I can prove that if I have to) and the only trick I had up my sleeve was that prime ideal -> ID and finite ID's are fields -> maximal, but it's not finite, so I am having difficulties constructing a proof...