How session works (internal processing of session) ?
Answer Posted / pankajbisane
To start a session:
– session_start()
– Creates a session identifier
– Session identifier is passed between client and server
either as
a Cookie, or in GET parameters
• Then, can create, access, and modify session variables:
– $_SESSION[session_var_name] = value;
– $_SESSION is only available once you call session_start()
– $local_variable = $_SESSION[session_var_name];
– Can check if session variable is set by using isset();
• To end a session:
– session_destroy();
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
Explain php parameterized functions.
How to create an array in php?
Why session is required?
Explain the difference between unlink() and unset()?
Explain me is multiple inheritance supported in php?
What is difference between web service and api?
How do I sort numbers in php?
Tell me what is the use of explode() function?
How to access a Static Member of a Class in PHP?
Explain Booleans in PHP?
What is difference between session and cookie in PHP?
Explain do you use composer? If yes, what benefits have you found in it?
Tell me what types of loops exist in php?
Which is the correct way to check if a session has already been started ?
why did u want to leave your past organisation?