So I'm currently working on a PHP login script, but I seem to be encountering an issue with an undefined variable: _SESSION. I'm not exactly sure what it means or how to fix it.
Here's some context about my script: I have a login form where users can enter their username and password. The form submits to a PHP script that checks if the credentials are valid, and if so, it sets some session variables to store information about the logged-in user.
However, when I try to access these session variables later on in my script or on another page, I get an error saying "Undefined variable: _SESSION". I'm not sure why this is happening or what I need to do to resolve it.
I've made sure that I have the session_start() function at the top of my PHP files, so I don't think that's the problem. I've also checked my php.ini file to ensure that the session module is enabled, and it seems to be fine there as well.
I'm wondering if I'm missing something in my code or if there's some configuration I need to set up to make sessions work correctly. Any guidance or suggestions would be greatly appreciated.
Thanks in advance!