Session | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Session

Why should we set session_start(); before any output in our document? another question šŸ˜… I know that when we closed the browser session will be destroy and the sessionID changes every time we open a browser but how the server still stored data about users ? I think this make me confused to understand session and cookie wellšŸ˜…

15th Mar 2018, 12:03 PM
Aya Habeeb
Aya Habeeb - avatar
2 Respostas
+ 2
of course to start that session you have to use session_start(); and that way you tell the program to start. and answer 2: I think sessions are more like cookies. hope you the best, yoosh šŸŒ·šŸŒ·šŸŒ·
17th Mar 2018, 4:02 AM
@mix_tory
@mix_tory - avatar
0
@mix_tory my question, what's happened if we put session_start in the end of our document ? why we should put it before any out put ? thank u šŸŒø
17th Mar 2018, 12:09 PM
Aya Habeeb
Aya Habeeb - avatar