PHP Session variables not being passed to the next page

后端 未结 2 1451
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-23 04:55

I know this title is duplicate to 1000\'s of other posts related to an issue and I apologize in advance if the solution is out there. Trust me I went through tons of posts regar

相关标签:
2条回答
  • 2021-01-23 05:36

    FIXED:

    I feel rather stupid after finding the solution but @webgal was right. I needed to put session_start() before < !DOCTYPE HTML> as well. I had it right below it and above the html tag. I'd like to thank you all for your time, patience and effort and sincerely apologize for my ignorance!

    0 讨论(0)
  • 2021-01-23 05:45

    This could be a permissions issue. Check where you sessions are being written to (session.save_path in your ini file). Usually it is in the /tmp folder. But if it set to another folder and your web server does not have permissions to write into it, you can encounter this issue.

    Additionally in the next page print session_id() to check if your session has started.

    0 讨论(0)
提交回复
热议问题