Jump to content

Problem with sessions


artcalv

Recommended Posts

Hi!

I have a problem with sessions in browsers with tabs (like Internet Explorer 7.0).
If I open a window of my php site, log in with an user and store it's name in a session var... and do exactly the same in another tab of the browser with a different user... then, when I change of tab, the session becomes the same in both windows!!

Another problem working with sessions... is there a way to know when the user has closed the browser's window? Because I need to log-out automatically.

What can I do? Please, help!!!!

Thanks :)
Link to comment
https://forums.phpfreaks.com/topic/34780-problem-with-sessions/
Share on other sites

Thanks for your reply!

Yeah, I have session_start() everywhere. I know that session is finished when browser is closed, but I NEED to know when someone closes it, because I have to change a value "connected" in my database... Something about capturing event of closing the window?

Any idea about the problem with tabs!

Thanks :)
Link to comment
https://forums.phpfreaks.com/topic/34780-problem-with-sessions/#findComment-163955
Share on other sites

If anyone knows it can be done in another language, please, tell me!

About the other problem I have, does any one have a solution? I repeat what happens:

"If I open a window of my php site, log in with an user and store it's name in a session var... and do exactly the same thing in another tab of the browser with a different user... then, when I change of tab, the session becomes the same in both windows!!"

What can I do??? Thanks a lot :)
Link to comment
https://forums.phpfreaks.com/topic/34780-problem-with-sessions/#findComment-164180
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.