  Let $p>3$ be a prime, and let $R_p$ be the set of rational numbers whose
denominator is coprime to $p$. Let $\{P_n(x)\}$ be the Legendre polynomials. In
this paper we mainly show that for $m,n,t\in R_p$ with $m\not\e 0\pmod p$,
$$\align &P_{[\frac p6]}(t) \e -\Big(\frac
3p\Big)\sum_{x=0}^{p-1}\Big(\frac{x^3-3x+2t}p\Big)\pmod p,
&\Big(\sum_{x=0}^{p-1}\Big(\frac{x^3+mx+n}p\Big)\Big)^2\equiv
\Big(\frac{-3m}p\Big) \sum_{k=0}^{[p/6]}\binom{2k}k\binom{3k}k\binom{6k}{3k}
\Big(\frac{4m^3+27n^2}{12^3\cdot 4m^3}\Big)^k\pmod p,$$ where $(\frac ap)$ is
the Legendre symbol and $[x]$ is the greatest integer function. As an
application we solve some conjectures of Z.W. Sun and the author concerning
$\sum_{k=0}^{p-1}\binom{2k}k\binom{3k}k\binom{6k}{3k}/m^k\pmod {p^2}$, where
$m$ is an integer not divisible by $p$.
