How can I display the incorrect password in html?

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.