How to create independent session
for each user
What is session?
What is session?
Codes for session
• // Start the session
session_start();
• // Set session variables
$_SESSION["favcolor"] = "green";
• // destroy the session
session_destroy();
 Create independent session for
each user
To create that we need :
• HTML – “Form login”
• PHP – “session”
 Plan to do that:
Form
My website1 2 Index.php 3
Create
session
Ch_login.php
4
info
Content.php 5
Create
session
Ch_logout.php
 Index.php
 Index.php
 Ch_login.php
 Ch_login.php
 content.php

Session php