Session variable not displaying

前端 未结 3 1453
小鲜肉
小鲜肉 2021-01-28 10:41

So I create a session on one page and create a new variable called uName and assign a value. I go to another page and try to echo the value but I get an error:\"Undefined variab

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-28 10:53

    You need to call session_start() again at beginning of the new file, like so:

提交回复
热议问题