Session object is used to store user information. Variables stored in the session object hold information about a single user and are available to all pages in an application.
Session Object
When you work with an application, you open it, make changes, and then close it. It's a lot like a conversation. The computer knows who you are. It knows when you open and close apps. But there's a problem on the Internet: Since HTTP addresses cannot persist state, the web server doesn't know who you are or what you do.
ASP solves this problem by creating a unique cookie for each user. The cookie is transferred to the client and contains information that identifies the user. This interface is called a Session object.
Session objects are used to store information about the user, or to change settings for a user's session. Variables stored in the session object hold information about a single user and are available to all pages in the application. The information stored in the session object is usually name, id, and parameters. The server creates a new Session for each new user and revokes the Session object when the session expires.
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn