There is a JAVASCRIPT logic that doesn't know how to write the solution.

Source: Internet
Author: User
There is a JAVASCRIPT logic that does not know how to write a web page based on PHP. there is a button to submit a form for personal data modification, where 1 must be filled in with the login password before modification, if the password is incorrect, you need to return the password error 2 and check whether the password is the same name and surname (which must be a little weird). if the same name and surname appear, a comfirm will pop up asking whether to change the password, no, I don't know how to implement this logic. I don't know how to write this logic when I have a JAVASCRIPT logic in java.
A PHP-based webpage has a button to submit a form for personal data modification.
1. enter the logon password to change the password. if the logon password is incorrect, an error occurs.
2. check whether the name is the same as the name (the name must be a little weird). If the name is the same as the name, a comfirm will pop up asking if the name is changed. If yes, modify the name and stop it.
This logic does not know how to implement it. in javascript

------ Solution --------------------
Both are inseparable from php, and Javascript is not required at all.
1. enter the logon password to change the password. if the logon password is incorrect, an error occurs.
This requires that the webpage form be submitted to php, php connects to the database, and the registered password is identified based on the input id. Compare the submitted password. if they are inconsistent, the system outputs "incorrect password"

2. check whether the name is the same as the name (the name must be a little weird). If the name is the same as the name, a comfirm will pop up asking if the name is changed. If yes, modify the name and stop it.
Before querying the user's registration password, you must first query the column that matches the user name. If there are more than one, output the modified HTML form. if you click cancel, close the page.
------ Solution --------------------
If your website certificate is a verification code, you can directly use php to return the result. if you need to test your experience problems, you still need to use ajax to realize the problem.
Click submit to submit ajax to the php certificate. The result is displayed in the previous example.

Do you have the same name and surname? Is it the same name? Or the same name must be separated and the same name must be separated... ask the question clearly, or others may have watched the battle. if the name is the same, it is a normal requirement.
------ Solution --------------------

P. php
PHP code
  

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.