Development tools and key technologies: Visual Studio 2015
Author: slowly
compose Time: April 5, 2019
usually do a project needs a landing page, then I'll do a summary login page.
A striking logged in as there are many, for example: I recently learned of a project is with students, teachers, administrators and super administrators four kinds of identity, the content of each page are logged into the inside has a large difference, different identities content are not the same continent.
Users need to use login passwords, user names can not be repeated or disclosure; when a user logged-on user type and user password or user name corresponds particularly important and so need special care attention.
Another is to jump page when the login is successful, landing a jump from page to page.
After a successful login exit there is a small function which, when clicked remember your password, click or not click, left to choose their own.
Login first to get cookie, transmit the data to a page, to get variable (user name, password, authentication code, and user types) then gets passed to the page stored in the session in the verification code and verification code to determine session input verification code are the same; and then compare the user name, password, user type in the database if you have consistent success, otherwise failed on landing.
Get cookie code:
Get the code page to pass variables: the
judge fill in the verification code in the session are the same:
If yes, the login is successful then the jump page:
otherwise failed on landing, re-landing.
Landing page as shown below:
There is a small function:
This function can be automatically logged in user login seven days every seven days or more than seven days must log in to re-enter the password.
The duration can be set, but the longest duration may not exceed one month, which is 30 days.
The reason is that the browser checks to set a good cookie has expired will be automatically deleted cookie.
Setting the login page
Guess you like
Origin blog.csdn.net/weixin_44560796/article/details/89082760
Recommended
Ranking