I want to set a different session ID depending on what folder a user is in.
For example, I have the domain https://example.com which has the folders /app1, /app2, etc. and then multiple files inside each app folder. I would like to set one session ID to be used with all files in app1 and a different session ID to be used in app2.
Can this be done?
Set the path in the session cookie with session_set_cookie_params
. Before session_start
of course.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With