php session doesn't work

前端 未结 8 536
余生分开走
余生分开走 2021-01-22 18:57

How it should work: Index.php is the secured page. It includes check.php, which checks if you have a session = good. If it hasn\'t, you\'re not logged in -> log off, remove sess

8条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-22 19:26

    You need to have session_start() at the top of all the pages, you havent shown the session start for your login page.

    (Thanks to Danny for proving I cant type)

提交回复
热议问题