PHP closes the browser and automatically triggers exit link code. how can this problem be written? & Nbsp; after I log on as a system member, I directly close my browser and then open the website without logging on again, I want him to directly close the browser and log on to the website the next time. The website has the write-out button function (for example, & lt; a & nbsp; href = "/index. php PHP closes the browser and automatically triggers the exit link. how can I write the code?
After I log on to the system member, I directly close the browser and then open the website, and do not need to log on again. I want him to directly close the browser and log on again next time, the website has the write-exit button function (for example). if there is any code that will automatically trigger the exit link when the browser is closed, the next time you open the browser, you will have to log on again. Share:
------ Solution --------------------
When SESSION is used to replace COOKIE, the SESSION closes the webpage and exits...
------ Solution --------------------
Right upstairs, you replace the cookie with the session. you can set the session time of the cookie. when the set time does not expire, even if the browser is closed, you still do not need to enter the account password. if you use session to close the browser, the session will be destroyed.
------ Solution --------------------
The login information is stored in the cookie. the browser closes and the cookie disappears.
------ Solution --------------------
Reference:
Quote: reference:
When SESSION is used to replace COOKIE, the SESSION closes the webpage and exits...
The problem is that I don't know how to write it. can you tell me?
How to write it depends on your original code. it is easy to just comment out the two statements that read the account password cookies.