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

前端 未结 8 504
执念已碎
执念已碎 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:23

    There's nothing special whatsoever about POST requests and sessions.
    You just need to call session_start at the top of every file request you want to use sessions in, that's it.

    Try again with that in mind, it ought to work.

提交回复
热议问题