In a principal ideal ring, is every nonzero prime ideal maximal? Inspired by this question, I was wondering whether from just the hypothesis that $A[X]$ is a nontrivial (commutative) principal ideal ring (so without supposing it is a domain) one can deduce that $A$ is a field. One possibility to prove that would be to use the fact, if it is one, that in principal ideal rings nonzero prime ideals are maximal. Namely, if $\def\p{\mathfrak p}\p\subset A$ is a prime ideal, then $(A/\p)[X]$, which is a quotient of $A[X]$ that is an integral domain but not a field, would have to be $A[X]$ itself, so $\p=(0)$, and $A$ having no nonzero prime ideals would have to be a field.
I think I can prove this, but I don't really like the argument I found, and since commutative algebra with zero divisors is not my speciality, I might have tripped up. So my question is are the proposition and its proof below correct, and if so is there a more elementary proof?
Notably I tried, under the hypothesis that $R$ is a principal ideal ring and $\p\subset R$ a prime ideal, and supposing $R\supset I=xR\supset\p=pR$, to use the existence of $y$ with $xy=p$ to arrive at a contradiction; but from $\p$ prime I only get $yR=pR$, and since over rings with zero divisors principal ideals may concide without their generators being associated, I don't see how to conclude.
(Proposed but false)
Proposition. Any nonzero prime ideal $\p$ of a principal ideal ring $R$ is maximal in $R$.
Proof. According to the Zariski-Samuel theorem $R$ is isomorphic to a finite direct product of rings that are either a principal ideal domain or a special principal ring. Every ideal $I$ of a finite product $R_1\times\cdots\times R_n$ is equal to a product $I_1\times\cdots\times I_n$ of ideals of the respective rings, where $I_k$ is the projection of $I$ to $R_k$ (clearly $I\subseteq I_1\times\cdots\times I_n$, but also $(0,\ldots,0,1,0,\ldots,0)I=\{0\}\times\cdots\{0\}\times I_k\times\{0\}\times\cdots\times\{0\}\subseteq I$) and since a product of more than one nontrivial ring is never an integral domain, 
$\p$ has to be of the form $R_1\times\cdots\times R_{k-1}\times\p_0\times R_{k+1}\times\cdots\times R_n$ where $\p_0\subset R_k$ is a prime ideal. So we have reduced to proving the proposition in the cases that $R$ is a principal ideal domain or a special principal ring. The former case is well known, and in a nontrivial special principal ring every ideal is a power of the unique maximal ideal $\def\m{\mathfrak m}\m$; putting $\p=\m^k$ a generator of $\m$ gives a nilpotent element of the integral domain $R/\p$, which must be zero, so $\p=\m$ as desired. QED
 A: If $A$ is a finite product of fields, then $A[x]$ is a principal ideal ring. I think the converse also holds.
A principal ideal ring has dimension $\leq 1$ (see here, this is elementary). If $A[x]$ is a principal ideal ring, then $1 \geq \dim(A[x]) \geq \dim(A)+1$, hence $\dim(A)=0$. Besides, $A$ is a principal ideal ring (as a quotient of $A[x]$), in particular noetherian. It is well-known that then $A$ is artinian, and that $A$ is a finite product of local artinian rings. Passing to one of the factors, we may assume that $A$ is local artinian ring and have to show that $A$ is a field.
[... to be continued later, I have to go now]
A: The missing piece of Martin Brandenburg's answer is the following:

Let $A$ be an artinian local ring such that $A[X]$ is a PIR. Then $A$ is a field. 

Obviously $A$ is a PIR. Let $\mathfrak m=(a)$ be the maximal ideal of $A$. If $a=0$ we are done. Assume that $a\neq 0$. Since $A[X]$ is a PIR, the ideal $(a,X)$ of $A[X]$ is principal, that is, there exists $f\in A[X]$ such that $(a,X)=(f)$. Then $A[X]/(f)\simeq A/(a)$ is a field, so $f$ generates a maximal ideal. On the other side, $A[X]/(a)\simeq A[X]/\mathfrak m[X]\simeq (A/\mathfrak m)[X]$ is an integral domain, so $a$ generates a prime ideal in $A[X]$. Since $a\in(f)$ we get that $a=fv$, $v\in A[X]$. Then $fv\in (a)$ implies $f\in (a)$ or $v\in (a)$. If $f\in (a)$, then $f=ag$, $g\in A[X]$. Since $X\in (f)$ there exists $h\in A[X]$ such that $X=fh$. We get $X=agh$ and then, by identifying the coefficients, we obtain $1=ab$, for some $b\in A$, a contradiction. If $f\notin (a)$, then $v\in(a)$, that is, $v=av'$, and therefore $a=afv'$. It follows that $1-fv'$ is a zerodivisor of $A[X]$. But it's easy to show that $J(A[X])=aA[X]$ and $Z(A[X])=aA[X]$ (here $J(A[X])$ stands for the Jacobson radical of $A[X]$ and $Z(A[X])$ for the set of zerodivisors of $A[X]$). Thus $1-fv'\in J(A[X])$. In particular, $1-(1-fv')=fv'$ is an invertible element of $A[X]$, so $f$ is invertible, a contradiction.
A: Below is a much more general characterization of PIR semigroup-ring $\rm\,R[S].\,$ Note that the polynomial ring $\rm\,R[x]\,$ is the special case when $\rm\:S \cong \Bbb N,\,$ and the Laurent polynomial ring $\rm\:R[x,x^{-1}]\:$ is the special case $\rm\:S\cong \Bbb Z.\:$ See this answer for much more.
Theorem $\ $ TFAE for a semigroup ring R[S], with unitary ring R, and nonzero torsion-free cancellative monoid S.   
$\rm(1)\ \ $  R[S] is a PIR (Principal Ideal Ring)
$\rm(2)\ \ $ R[S] is a general ZPI-ring  (i.e. a Dedekind ring, see below)
$(3)\ \ $ R[S] is a multiplication ring  (i.e.  $\rm\ I \supset\ J \Rightarrow\ I\ |\ J\ $  for ideals $\rm\:I,J\,)$
$(4)\ \ $ R is a finite direct sum of fields, and $\rm\,S\,$ is isomorphic to $\,\mathbb Z\,$ or $\,\mathbb N\,$ 
A  general ZPI-ring  is a ring-theoretic analog of a Dedekind domain 
i.e. a ring where every ideal is a finite product of prime ideals. 
A unitary ring R is a general ZPI-ring $\iff$ R is a finite direct sum 
of Dedekind domains and special primary rings (aka SPIR = special PIR) 
i.e. local PIRs with nilpotent max ideals. ZPI comes from the German 
phrase "Zerlegung in Primideale" = factorization in prime ideals. 
The classical results on Dedekind domains were extended to rings 
with zero divisors by S. Mori circa 1940, then later by K. Asano 
and, more recently, by R. Gilmer. See Gilmer's book "Commutative 
Semigroup Rings" section 18 (and section 13 for the domain case). 
A: I guess the answers given clearly show that what I set out to show ($A[X]$ a principal ring implies $A$ a field) is false, and since the deduction of that conclusion from the proposition seems straightforward enough, the proposition must also be false. Indeed it is: by the first two points in Step 0 of Pete L. Clark, for any pair of fields $F,F'$ the ring $(F\times F')[X]$ has a prime ideal $(F\times\{0\})[X]$ that is not maximal.
In particular, the ring $\def\Z{\mathbf Z}(\Z/10\Z)[X]$ is a principal ideal ring, while $\Z/10\Z$ is of course not a field. More generally $(\Z/n\Z)[X]$ provides a counterexample whenever $n$ is composite but square-free. To see explicitly that this is a principal ideal ring, reduce a given ideal $I\in(\Z/n\Z)[X]$ modulo every prime factor$~p$ of$~n$, find a minimal degree nonzero element as generator, or $0$ if the ideal collapses to $\{0\}$ modulo$~p$, then apply the Chinese remainder theorem separately for the coefficients of each $X^i$ to reconstruct a polynomial in $(\Z/n\Z)[X]$ that represents all those generator polynomials at once, which gives a generator of $I$.
So what about the proof (which I really believed in when I wrote it)? It is the innocent looking condition "nonzero" that was overlooked in the proof: the fact that $R_1\times\cdots\times I_k\times\cdots\times R_n$ is nonzero does not imply that $I_k$ nonzero. So there is no reduction to the same proposition for each of the factors, and the proof fails. In fact the proposition itself fails as soon as there is at least one PID factor and at least one other nontrivial factor in the product of rings.
A: Martin Brandenburg is right: for a commutative ring $A$, $A[t]$ is a principal ideal ring (henceforth a "principal ring") iff $A$ is a finite product of fields.
In the following, all rings will be commutative.
Step 0: We make use of the following easy facts:
$\bullet$ A finite product of principal rings is a principal ring.
$\bullet$ For any rings $A_1$ and $A_2$, we have $(A_1 \times A_2)[t] \cong A_1[t] \times A_2[t]$.
$\bullet$ For any ideal $I$ in a ring $R$, $R[t]/IR[t] \cong (R/I)[t]$.
Step 1: If $A[t]$ is principal, so is $A$.  By a theorem of Hungerford, $A$ is isomorphic to a finite product of rings $\prod_{i=1}^r A_i$, each of which is either a PID or a quotient of a PID.  Then $A[t] \cong \prod_{i=1}^r A_i[t]$. Each $A_i[t]$ has dimension one more than the dimension of $A_i$, so if there is a PID factor then $A[t]$ has dimension $2$, contradiction.  So we are left with the case of a finite product of quotients of a PID.  By a Chinese Remainder Theorem argument we can further decompose this into a finite product of quotients of DVRs, and thus we reduce to the following local case:
Let $A$ be a DVR with uniformizer $\pi$.  If for some $n \in \mathbb{Z}^+$ the ring $B = A/\langle \pi^n \rangle[t] \cong A[t]/\langle \pi^n \rangle$ is principal, then $n = 1$.
Step 2: Let's assume $n > 1$. The evident thing to do here is try to show that the ideal (in $B$ naturally corresponding to) $I = \langle \pi ,t \rangle$ is not principal.  This should be an elementary calculation.  I decided to reduce myself to an easier calculation though: if $I$ were principal, then so would be its pushforward in the quotient ring $B' = A[t]/\langle \pi,t \rangle^2$, and this calculation is truly easy: suppose $I = \langle p \rangle$.  Then there are $x,y \in B'$ with $px = \pi$, $py = t$.  We can write
$p = p_0 + p_1 t$, $x = x_0 + x_1 t$, $y = y_0 + y_1 t$ with $p_i,x_i,y_i \in A$.  If you multiply everything out and consider the "valuations" of $p_i$, $x_i$, $y_i$ -- here I use parentheses because I am working in a quotient with $\pi^2 = 0$, so one can think of every element as having valuation $0$, $1$ or $\geq 2$ -- then you see in a few lines that this is not possible.
$\newcommand{\mm}{\mathfrak{m}}$
Added: Here is an approach to Step 2 that avoids any computation.  Consider the maximal ideal $\mm = \langle \pi, t \rangle$ in $\tilde{B} = A[t]$.  It obviously has height at least $2$, so by the Generalized Principal Ideal Theorem (GPIT) it is not principal (and in fact has height exactly $2$).  Consider its image in the localization $C = \tilde{B}_\mm$: the height has not changed so it still requires $2$ generators.  By Nakayama's Lemma, the minimal number of generators of $\mm$ is equal to the minimal number of generators of $\mm/\mm^2$, so $\mm/\mm^2$ is indeed a nonprincipal ideal in $C/\mm^2 = B'$.

Comments: 1) Note that I ended up using a harder result than the one of Zariski-Samuel that a principal ring is a finite product of PIDs and Artinian principal rings.  In particular, the result of Zarisk-Samuel is proved in my commutative algebra notes, but Hungerford's Theorem is only stated: the proof uses the Cohen structure theory of complete local rings, which I do not treat.  I expect this will turn out to be overkill.


*If you only wanted to answer the title question, there are easier ways to go.  Martin Brandenburg's answer links to a webpage which gives a completely elementary proof that a principal ideal ring has dimension at most one.  To my mind though the most natural proof of this is simply to apply Krull's Principal Ideal Theorem, which implies that a prime ideal of height $n$ in a Noetherian ring requires at least $n$ generators.


*If in the construction above we take our DVR $A$ to be $\mathbb{Z}_p$, then the ring $B' = A[t]/\langle p,t \rangle^2$ is a nonprincipal ring of finite order $p^3$.  This is minimal in the sense that a finite nonprincipal ring must have order divisible by the cube of some prime.


*Note that a commutative ring is a finite product of fields iff it is a semisimple ring: every short exact sequence of $R$-modules splits.  Is there a different proof which uses this fact?
