After a user registers, the user jumps to another page to generate a SESSION. But after I close my browser, I have to log on again. where is this technique. What Cookie does it need? ------ Solution ------------------ well, use cookie ------ solution ---------------------- upstairs solution -------------------- see the maintenance of s user registration
After the user registers, he jumps to another page to generate a SESSION.
But after I close my browser, I have to log on again. where is this technique.
What Cookie does it need?
------ Solution --------------------
Well, use cookies
------ Solution --------------------
Upstairs positive solution
------ Solution --------------------
See the setcookie function description and $ _ COOKIE variable usage.
------ Solution --------------------
When you use cookies, you can skip the session. why must you use the session ??
------ Solution --------------------
The cookie variable stored for page reading. Generally, you can encrypt and save the cookie data to handle forgery.
Discussion
Reference:
When you use cookies, you can skip the session. why must you use the session ??
If a COOKIE is used, how can I determine that the next user login is legal? What if the COOKIE is violated?
------ Solution --------------------
Discussion
If a COOKIE is used, how can I determine that the next user login is legal? What if the COOKIE is violated?
------ Solution --------------------
After the session is used, no cookie is needed. the browser will create a session
------ Solution --------------------
This can be done with SESSION, without cookie
Of course, you can also use cookies on a regular basis.
The following are the tips for using session Health check:
Session Authentication is performed on the top of the page. for example, after successful logon, $ _ SESSION ['name'] = "123 ";
Add this sentence to the top. if (! Isset ($ _ SESSION ['name']) {die ("do something else ")}
------ Solution --------------------
After a user logs on to the registry, you need to generate a session to save some information. This new message can be used to determine the permission logon status.
When the browser is closed, delete the corresponding session. In this way, the user needs to log on again without knowing what the session is. Close the browser and delete the session.