Ask a difficult logout question

Source: Internet
Author: User
Is it difficult to log out? Description: userState (1 is not logged on, 2 is logged on), a login. on the php page, after logging in successfully (saving the COOKIE or SESSION), modify the userState (user status) in the database & nbsp; 2. if the user clicks cancel (clear COOKIE or SESSION), then modify userState & nbsp; & nb in the database to ask a difficult cancellation question?
Note:
UserState (1 is not logged on, 2 is logged on ),
A login. on the php page, after logging in successfully (saving the COOKIE or SESSION), modify the userState in the database (user status) = 2. if the user clicks cancel (clear COOKIE or SESSION), then modify userState = 1 in the database
Q: How can I change this userState to 1 when this user directly closes the page without logging out?

------ Solution --------------------

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.