Let p be an odd prime. Show that the Diophantine equation x^2+py+a=0; gcd(a, p)=1 has an integral solution if and only if (-a/p)=1.
I am not sure what you are doing. The meaning of (-a/p) is not a fraction, it means this.
There exists an $\displaystyle x$ and $\displaystyle y$ that solve this equation if and only if $\displaystyle x^2 + a = p(-y)$ if and only if $\displaystyle p|(x^2+a)$ if and only if $\displaystyle x^2\equiv -a(\bmod p)$, and this has a solution if and only if $\displaystyle (-a/p)=1$.