Embed presentation
Download to read offline
![HOW IT WORKS
SESSION START
SESSION_START();
START
SET COOKIE
PHPSESSID=RANDOM ID
BROWSER SAVES
COOKIE
GENERATE RANDOM
SESSION ID
CREATE SESS_RANDOM_ID
FILE ON SERVER
SESSION SET
$_SESSION
["COLOR"]="RED";
SAVES COLOR=RED
INSESSION FILE
START
SESSION RESUME
BROWSER SENDS
COOKIE TO SERVER
READ DATA FROM
SESSION FILE
SESSION_START();
SESSION RESTORED!
VAR_DUMP($_SESSION);
START
query@cetpainfotech.com
SOURCE: https://pin.it/1yyAqaW
Top 4 PHP Frameworks
+919212172602](https://image.slidesharecdn.com/untitleddesign-230322083244-4b3739ea/75/Sessions-In-PHP-How-it-Works-pdf-1-2048.jpg)
The document outlines the process of starting and managing a PHP session, detailing steps such as setting cookies, generating random session IDs, and saving session data on the server. It describes how to restore a session when the browser sends the cookie back to the server. Additionally, the document includes a contact email and a reference to PHP frameworks.
![HOW IT WORKS
SESSION START
SESSION_START();
START
SET COOKIE
PHPSESSID=RANDOM ID
BROWSER SAVES
COOKIE
GENERATE RANDOM
SESSION ID
CREATE SESS_RANDOM_ID
FILE ON SERVER
SESSION SET
$_SESSION
["COLOR"]="RED";
SAVES COLOR=RED
INSESSION FILE
START
SESSION RESUME
BROWSER SENDS
COOKIE TO SERVER
READ DATA FROM
SESSION FILE
SESSION_START();
SESSION RESTORED!
VAR_DUMP($_SESSION);
START
query@cetpainfotech.com
SOURCE: https://pin.it/1yyAqaW
Top 4 PHP Frameworks
+919212172602](https://image.slidesharecdn.com/untitleddesign-230322083244-4b3739ea/75/Sessions-In-PHP-How-it-Works-pdf-1-2048.jpg)