Home > Article > Backend Development > PHP session cannot be obtained across multiple pages
The session is open, and so is the session_id(). Even after printing it twice, it’s the same. What’s going on?
The session is open, and so is the session_id(). Even after printing it twice, it’s the same. What’s going on?
Note to the original poster:
1. Make sure each script page calls session_start() before outputting at the top;
2. Make sure the two pages opened are in the same browser (session is related to browser cookies and cannot cross browsers) ;