PHP Session
PHP Session
PHP session is used to store and pass information from one page to another
temporarily (until user close the website).
PHP session creates unique user id for each browser to recognize the user and
avoid conflict between multiple browsers.
Syntax
1. bool session_start ( void )
Example
1. session_start();
PHP $_SESSION
PHP $_SESSION is an associative array that contains all session variables. It
is used to set and get session variable values.
1. $_SESSION["user"] = "Sachin";
1. echo $_SESSION["user"];