Home  >  Article  >  Backend Development  >  What should I do if the system written in PHP suddenly fails to log in?

What should I do if the system written in PHP suddenly fails to log in?

angryTom
angryTomOriginal
2019-11-04 11:01:482622browse

What should I do if the system written in PHP suddenly fails to log in?

What should I do if the system written in php suddenly cannot log in?

Usually we use open source programs when making PHP programs, but some of them cannot meet our needs, so we need to write them ourselves. If you write it yourself, you will inevitably have writing bugs. Let’s take a look at how to find the errors and correct them.

The PHP login system usually has three fields for verification: username, password, and verification code, which involve database, form value transfer, etc. Usually, troubleshooting these areas can solve the problem.

1. First open the php login system, press f12, open the debugging tool, and click network

Note: Login will jump to the interface, causing historical requests to be cleared. Just check Preserve log

What should I do if the system written in PHP suddenly fails to log in?2. Then enter the user name, password and other data, and click the login button of your php login system.

What should I do if the system written in PHP suddenly fails to log in?

3. Check whether the post data is normal.

What should I do if the system written in PHP suddenly fails to log in?

4. Output the received data in the php background to see if it is consistent with the front desk

echo $_POST['username'];
echo $_POST['password'];
echo $_POST['code'];

5 , Check whether the SQL statement is correct, such as the quotation marks of username and paddword, and the database connection statement of high version PHP.

Through the above checks, you can solve the problem of being unable to log in.

For more PHP related knowledge, please visit PHP Chinese website!

The above is the detailed content of What should I do if the system written in PHP suddenly fails to log in?. For more information, please follow other related articles on the PHP Chinese website!

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

Related articles

See more