javascript - registration verification issue
学习ing
学习ing 2017-07-05 11:08:43
0
2
793

For a registration function, after the user fills in the basic data and submits it, but does not complete the verification, then during the period between submitting the data and verification, the data is generally placed there, in the client or server session. , or in the zero-time table of the database.

学习ing
学习ing

reply all (2)
阿神

The registration verification problem has been solved, here we use email verification.
The steps are as follows:

  • Add two fields to the user table, hash and active.

  • Construct a stored procedure or other program for the database to scan the user table regularly, calculate the submission time of inactive account information, and delete the account information for accounts that exceed a fixed period of time. The hash field is used to store a hash value generated for each user. When used for email verification, the hash value is used to find the corresponding user.
    active stores two values, 0,1.0 means the account is activated, 1 means the account has been activated

  • After the user completes filling in the basic information, submit the operation, then generate a hash value for the user, store the user information in the user table, and set the active field to 0

  • After saving the information, construct a connection, use the hash value generated in the previous step as the parameter of the link, and send it to the user's mailbox.

  • After the user completes the verification, the hash value is transmitted to the server. The server finds the corresponding user based on the hash value, and then sets the user's active field to 1. If it is not found, it prompts that the user information has expired and refills the information registration

    代言

    Shouldn’t it be saved on the page? Just get the value again when you click submit. Or does your verification refer to email or mobile phone verification? If so, it will be saved in the database

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!