If $A$ is an integral domain and $f\in A[X]$ has infinitely many zeroes in $A$, then $f$ is the zero polynomial.
To see this, note that any zero $a\in A$ allows us to write $f(X)=(X-a)g(X)$ with $\deg g<\deg f$. Hence after factoring out $\deg f$ zeroes, we are lef with a degree zero factor, i.e., a constant: $f(X)=c(X-a_1)(X-a_2)\cdots (X-a_n)$. If we plug in yet another zero $a_{n+1}$, the right hand side is a product of $c$ and some non-zero factors. As $A$ is an integral domain, $f(a_{n+1})=0$ implies $c=0$, so $f=0$.
Now we can do a proof by induction: $k[X_1,\ldots,X_n]=A[X_n]$ where $A=k[X_1,\ldots,X_{n-1}]$ is an integral domain(!). So if $f\in A[X_n]$ is not the zero polynomial, there exists some $b_n\in k$ such that $f(b_n)$ is not the zero polynomial.
But spelled out, this means that $g(X_1,\ldots,X_{n-1}):=f(X_1,\ldots, X_{n-1},b_n)\in k[X_1,\ldots,X_{n-1}]$ is not the zero polynomial. By induction hypothesis, there exists $(b_1,\ldots,b_{n-1})\in k^{n-1}$ with $g(b_1,\ldots,b_{n-1})\ne0$, i.e., $f(b_1,\ldots, b_n)\ne 0$.