In my index.php file I call session_start() and set a couple of session variables. In a second PHP file I would like to access these session variables.
Add the following code to the file browse.php:
error_reporting( error_reporting() & ~E_NOTICE );
if( ! ini_get('date.timezone') )
{
date_default_timezone_set('GMT');
}
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
if(session_id() == '') {session_start();}
} else {
if (session_status() == PHP_SESSION_NONE) {session_start();}
}
It will work fine.