User registration support

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.