A session is a way to store information (in variables) to be used across multiple pages. Unlike a cookie, the information is not stored on the users computer.
A session is started with the session_start() function.
Session variables are set with the PHP global variable: $_SESSION.
Note: The session_start() function must be the very first thing in your document. Before any HTML tags.
Edit the code below and click Run to see the result live.