Setting the login page

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:
Here Insert Picture Description
Get the code page to pass variables: the
Here Insert Picture Description
judge fill in the verification code in the session are the same:
Here Insert Picture Description
If yes, the login is successful then the jump page:
Here Insert Picture Description
otherwise failed on landing, re-landing.
Landing page as shown below:
Here Insert Picture Description
There is a small function: Here Insert Picture Description
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.

Guess you like

Origin blog.csdn.net/weixin_44560796/article/details/89082760