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.
session_start()
I had this problem and tried different ways and finally found a solution :
PHP is case sensitive, Use $_SESSION instead of $_session in all php files.certainly It works . Example :
"; echo $_SESSION["s2"].""; ?>