Home  >  Article  >  Database  >  mysql-php verifies whether the username and password in the database are correct

mysql-php verifies whether the username and password in the database are correct

WBOY
WBOYOriginal
2016-10-09 08:32:062120browse

mysqlphp

Please help me look at this code. It is logically correct. However, no matter whether you enter the correct user name and password or wrong ones, the login failure will be displayed.

Reply content:

mysql-php verifies whether the username and password in the database are correct

This is the code in the picture above. Where is the master?

Echo the sql statement and see if you know it

Damn it, how did you write the login sql? This way of writing is easy to inject. Is your password stored in clear text? ? If the password is correct, try removing the single quotes

Statement:
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