First I do not enter the password directly into the background page
Http://localhost/myapp/index.php/Admin/index
Can't get in, go straight back to the login page
Enter account number, password, verification code
Jump to Background page success
Turn off the window and enter the background address
Into success
Turn off the window, clear the Cooki, and then enter the background address
Back to login page
Login page Enter the correct name, the wrong password, the correct verification code
Incorrect account or password
Login page Enter the wrong name, the correct password, the correct verification code
Incorrect account or password
Login page Enter the correct name, the correct password, the wrong verification code
The code is error
View Source Files
|
|
|
<body> |
|
|
|
<form action= "/myapp/index.php/index/login.html" method= "post" > |
|
Name: <input type= "text" name= "name" ><br> |
|
Password: <input type= "text" name= "password" ><br> |
|
Code: <input type= "text" name= "code" ><br> |
|
src= "/myapp/index.php/index/verify.html"/> |
|
<input type= "submit" > |
|
|
|
</form> |
|
|
|
</body> |
|
|
Test completed, basic implementation of the login function, including the session function
Login function: The input data is taken out and compared with the database data
Session function: After successful login, the data in the database is written to the session, automatically detected, detect the existence of local cookies, and contain the corresponding data
Login function test