Session Variable in WordPress
Web application is stateless, which means once the request is fulfilled, all variables involved during the request will be gone. Most of the time, programmer needs to be able to access data that was set during previous session, and for this, there are many methods that can be used, one of them is using session.
With session, data that is used during a request can be stored inside a text file on web server. When needed in different request, this data can be read so it will be available to be used during this new request.