>  기사  >  php教程  >  PHP《个人管理系统》之修改密码

PHP《个人管理系统》之修改密码

WBOY
WBOY원래의
2016-06-13 11:15:07893검색

介绍

现在有了登录功能,但是没有修改密码的功能。这次就把修改密码功能添加上去。

流程

>> 关键点:

1、两个密码不能为空,而且必须大于等于5个字符;

2、两个密码不能相同;

3、要保证旧密码是正确的,才能进行修改。

>> 前端js验证部分:

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448379.png" />

>> 后端验证:

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448554.png" />

登录截图

  498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448206.png" />成功登录后界面

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448302.png" />

  498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448206.png" />点击修改密码

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448503.png" />

 498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448206.png" />什么都不输入,空提交

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448829.png" />

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448206.png" />输入字符不够5个

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448839.png" />

 498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448206.png" />旧密码输入错误

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448239.png" />

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448206.png" />新、旧密码输入相同

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448560.png" />

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448206.png" />修改成功,关闭弹出框

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448936.png" />

代码片段

JS片段:

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095448205.png" />

PHP片段:

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095449997.png" />

svn提交代码:

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095449909.png" />

总结

欢迎大家过来探讨和研究。

地址:

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="\" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095449457.png" />

这是详细的技术文档:

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.