ホームページ  >  記事  >  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 までご連絡ください。