Let $R$ be a commutative ring with 1. If $R$ is a PID, then every prime ideal is either zero or maximal.
My proof: Let $I = (p)$ be a non-zero prime ideal of $R$. Note that $p$ is prime. Since $R$ is an integral domain, $p$ is also irreducible. Suppose $I \subseteq J = (m)$, then we have $m | p$, and so $p = mk$. Since $p$ is irreducible, $m$ is a unit or $k$ is a unit. If $m$ is a unit, then $J = R$. If $k$ is a unit, then $p \sim m$, and so $I = J$. Therefore, I is maximal. Hence, if $R$ is a PID, then every prime ideal is either zero or maximal.
However, I don't quite get where I need to use PID. It seems that it works on integral domain too. Where am I getting it wrong?