Undefined variable: _SESSION when sending variables via post through JavaScript trigger

前端 未结 8 508
执念已碎
执念已碎 2020-12-14 15:49

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.

8条回答
  •  别那么骄傲
    2020-12-14 16:29

    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"]."
    "; ?>

提交回复
热议问题