Every ideal in $K[x]$ is of the form $(p(x))$ for some $p(x) \in K[x]$. But the result is not valid for the ring $K[x_1,...x_n]$.
Comments:
I was able to solve the first case using the division algorithm. But I have difficulty justifying the second part, I know that the ideal $ (x_1, x_2) $ is an ideal that is not generated by $p(x)$.