PHP session variables not carrying over to my logged in page, but session ID is

后端 未结 4 1797
太阳男子
太阳男子 2020-12-17 03:15

I\'m using PHP 4.3.9, Apache/2.0.52

I\'m trying to get a login system working that registers DB values in a session where they\'re available once lo

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-17 03:52

    I don't see a session_start() in your login script. If you aren't starting the session I don't think php will save any data you place in the $_SESSION array. Also to be safe I'd explicitly place variables into the $_SESSION array instead of just overwriting the whole thing with $_SESSION = mysql_fetch_array($result);.

提交回复
热议问题