SESSIONS QUESTIONS OF PHP



Q.1 How does Database handle Sessions?


ANSWER: As you should be aware the HTTP protocol, as used for serving web pages, is completely stateless. This means that after the server has received a request, processed it and sent a response, the process which dealt with that request dies. Anything that the process had in its memory therefore dies with it, so when a subsequent request is received from the same client it is unable to refer to its memory about anything that happened previously. Fortunately PHP provides a standard method of maintaining memory (state) between ....!


Q.2How many ways can we get the value of current session id?

ANSWER: session_id() returns the session id for the current session.

Q.3 Definition of login session?

ANSWER: A Login Session describes the connection established by a user with a Login, until either the user or the system or service to which he connected terminates the connection.

Normally, a user must only provide Credentials for Authentication at the start of a Login Session. He is then authorized to use some or all of the services offered by the Host System to which he connected.

Q.4 What is session in php?

ANSWER: A php session is no different from a normal session.
It can be used to store information on the sever for future use......