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 checkPreserve log
2. Then enter the user name, password and other data, and click the login button of your php login system.
3. Check whether the post data is normal.
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 visitPHP 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!