Display the incorrect password information on the webpage, as prompted by Baidu.
Display the incorrect password information on the webpage, as prompted by Baidu.
Reply content:
Display the incorrect password information on the webpage, as prompted by Baidu.
It provides a simple idea. Ajax submits data and determines whether to Display Error Information Based on the status code returned by the background.
If the password is incorrect, set it in the controller, that is, V in MVC.$ Message = 'user name or password error ';
View judgment
If (! Empty ($ message) {echo $ message ;}
Add the error to the session. The page on which the error occurred is displayed and set to null.
You can also do this using AJAX.
You can decide what your code is.
As mentioned above, the error code is returned. The front-end has a corresponding error code json. You can find the corresponding error information through the code value and then display it on the interface.