I create a session
and try to access it from another page under same domain and directory but it is not working.
<?php
session_start();
error_reporting(E_ALL);
$_SESSION['abc'] = 'ajsdkla skjld ajsdlkja skld jasl';
echo $_SESSION['abc'];
?>
Code for second page
<?php
error_reporting(E_ALL);
session_start();
echo '<h1> Session = '.$_SESSION['abc'].'</h1>';
?>
You can also check it on live here is a page one link
And here is a second page link
When I try to access session
on second page I found this error Notice: Undefined index: abc
I really wonder why this is happing can you please check it.