A session is a way to store information tp be used across multiple pages.
Session is not stored on the users computers.
We open a application or web and we make some changes on that and close it.This all things we did in that is like as session.
The problem with the server is that server not know who you are because HTTP address does’t maintane state.
Session is the solution of that problem by storing users information to be used across multiple pages.
Session is started with the session_start() function.
Session php globle variable is $_SESSION.
//set session variables
$_SESSION[“color”] = “red”;
echo “My home town is ‘”.$_SESSION[“city”].”‘”.
echo “My shirt color is ‘”.$_SESSION[“color”].”‘”.