0
When will the session end in php?
Guys i have a doubt about if we start our webpage with <?php session_start(); ?> For ever user that will generate a special session in browser My question is when will this end? As cookies can be mentioned with time expries when will session end? I tested this and found even if i close the tab its stored?
8 ответов
+ 2
Session will end in php when you end stop an event like if you close the webpage then the session will end. Depends on your requirements like some session end when the times bound is expire.
0
Might be helpful:
https://stackoverflow.com/questions/20129774/when-does-a-php-session-end#:~:text=If%20your%20session%20values%20are,a%20cookie%20of%20type%20session%20.
0
Samsil Arefeen but what if the session is not linked with cookies will that vanish after the browser closes?
0
I don't know anything about php .So might be helpful:
https://stackoverflow.com/questions/12572134/php-sessions-with-disabled-cookies-does-it-work
0
Samsil Arefeen ok thank you ✌️😊
0
Session ends when u destroy it yourself session_destroy() or if you close your browser and try to access the page again. If you still have access to the website, try clearing your browser session and cookies first and then test it again.
0
Dev thank you 😊✌️
0
HAMID ALI how can we set time limit for session in php?