Session Management

Session ID must be different to all pages.

Ques:- How to create session ID different to all pages.
Ans:-session ID is create different through session_regenerate_id(true) function.

eg:- in login.php

     session_start();
     session_regenerate_id(true);
     $_SESSION['user_id']  =$results['uId'];
     $_SESSION['uName']  =  $results['uName'];

write the code to all pages

session_start();
$sess_uid=$_SESSION['user_id'];
$sess_uname=$_SESSION['uName'];
unset($_SESSION['user_id']);
unset($_SESSION['uName']);
session_regenerate_id(true);
$_SESSION['user_id']=$sess_uid;
$_SESSION['uName']=$sess_uname;