验证码有关问题

WBOY
Release: 2016-06-13 13:33:33
Original
930 people have browsed it

验证码问题
做了个验证码的类,但是验证时不怎么人性化,用SESSION保存随即数字
好像只能从后台PHP验证,获取$_SESSION的值与输入的值比较,
能不能放到前台验证啊,像用户名一样用JS,用户输入验证码后就知道错误还是正确

怎么做啊。。谢谢~


------解决方案--------------------
前台ajax提交后台验证啊。。。
------解决方案--------------------
一般采用后台验证,可以通过ajax来实时验证。
如果非要在前台js直接验证的话可以采取加密方式,但是风险依然存在,不推荐。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!