I now system member login, directly close the browser and then open the site do not need to log in again, I want him to directly close the browser next open also want to log in, the site has write exit button function (such as), there is no code in the browser when the automatic trigger exit link exit, the next time you open the browser will be re-login.
Reply to discussion (solution)
Using the session instead of Cookie,session is to close the page and exit ...
On the upstairs, you change the cookie to session,cookie the session time can be set, when the set time is not expired, even if the browser is closed, the next time the visit, or do not need to enter the account password, with the session, close the browser, the session will be destroyed.
The login information is saved in the cookie, the browser closes, and the cookie disappears.
Using the session instead of Cookie,session is to close the page and exit ...
The problem is I don't know how to write, can you tell me?
Using the session instead of Cookie,session is to close the page and exit ...
The problem is I don't know how to write, can you tell me?
How to write to see your original code, it is relatively simple to read into the account password cookies two sentences to comment off the line
It would be nice to hide the Setcookie and cookie statements.
1. As LS says, use the session
2. If you do not want to consume server resources, use JavaScript to determine if the browser shuts down and then destroys the cookie.