登记时在服务器端应该做什么验证字段的合法性

WBOY
Release: 2016-06-13 12:13:18
Original
968 people have browsed it

注册时在服务器端应该做什么验证字段的合法性?
RT,表单的参数有username,password,email,只会在前端验证,但是觉得光用JS不靠谱
------解决思路----------------------
username,password:是否包含特定字符,如admin,最短(最长)多少个字符
email:是否是合法的email地址
插入数据库时再addslashes

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