Page1.php
<?php
session_start();
$_SESSION['test'] = 'abc';
echo "the Session are set = ".$_SESSION['test'];
?>
Result: the Session are set = abc
page2.php
<?php
session_start();
if(isset($_SESSION['test'])){
echo "Session = ";
echo $_SESSION['test'];
}else{
echo "Session are not set";
}
?>
Result: Session are not set