PHP - Log in Script Not Creating Sessions

后端 未结 3 2041
醉酒成梦
醉酒成梦 2021-01-26 13:04

I have a log in script where I have been able to successfully make users, and log in. Now my issue is that whenever I try to use my method of protecting pages, being seeing if t

3条回答
  •  再見小時候
    2021-01-26 13:15

    You have session_start(); after $_SESSION['user'] = $row; Actually you have it after a die(); command. Nothing happens after that.

    Put session_start(); at the top of PHP in every page (pref common.php since you have one) not just one page.

提交回复
热议问题