PHP detects whether account password matches

Release: 2023-02-27 22:16:01
Original
2466 people have browsed it

PHP detects whether account password matches

PHP detects whether the account password matches:

Recommended:php server

HTML code:

   



Copy after login

PHP code:

where($where)->select(); if($users){ $_SESSION['id']=$users['id']; $_SESSION['user_shell']=md5($users['username'].$users['password']); $this->redirect('Index/index'); }else{ echo ""; } }else{ $this->display(); } } public function lusername(){ $where['username']=I('username'); $users=M('users')->where($where)->select(); if(!$users){ echo "用户名错误"; } } public function lpassword(){ $where['password']=I('password'); $users=M('users')->where($where)->select(); if(!$users){ echo "密码错误"; } } }
Copy after login

The above is the detailed content of PHP detects whether account password matches. For more information, please follow other related articles on the PHP Chinese website!

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
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!