Sessions logout. When delete it and when change? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Sessions logout. When delete it and when change?

where i work they destroy the session, but is better to change it to say the session is over?

5th Dec 2017, 11:21 AM
Cristian Seoane
Cristian Seoane - avatar
4 Answers
+ 4
Ok if you are working with forms,, the part of log out,, you should use session_destroy() ; to destroy all the sessions or use session_unset() ; it will do the same
5th Dec 2017, 5:15 PM
Dennoh Peter
Dennoh Peter - avatar
+ 3
Is this a question or a statement
5th Dec 2017, 1:29 PM
Dennoh Peter
Dennoh Peter - avatar
+ 2
on login u need to use the session created then on logout the session destroy logout is used.
8th Dec 2017, 7:59 PM
EVANS KIPTARUS KIBET
EVANS KIPTARUS KIBET - avatar
+ 1
sorry for my English. is a question because i'm not sure of which option is better or in which situation. Delete all the session always, change it or a mix?
5th Dec 2017, 2:14 PM
Cristian Seoane
Cristian Seoane - avatar