how to split session

A

Anonymous

Guest
I need to open a link in new window, but I want to start a new session for this new window and at the same time keep the old one for the origin browser window. [/img]
 
I don't believe this can be done in the way you describe. But why not use a single session and just have two sets of session variables within the session? That's easy.
 
swirlee said:
...why not use a single session and just have two sets of session variables within the session? That's easy.

I don't think it's easy, because I don't know how many times this could happen. There may be a huge amount of data in the session unnecessery for the new session.

I have running script that uses session to store client id (basicaly it's an id of the owner of the site). Everything is OK, it's running for different clients for a longer time. But now some clients need to add links from their "side" and point to another client "site" (which is the same script running on the same server). So the question is: how to solve this.
 
you may crete somthing self:
1) generate MD5 hash
2) assign this hash to IP
3) input data to MySQL
4) use date for live of yor session
 
WiZARD said:
you may crete somthing self:
1) generate MD5 hash
2) assign this hash to IP
3) input data to MySQL
4) use date for live of yor session

This wouldn't solve the problem, because I need multiple different "sessions" for one IP. Those "sessions" started from one browser window. I want to start new session from link like
http://my_server.com/?new_session=yes&whatever=646565&whatever_else=hkjhkjh&....

AND at the same time keep all session info for the origin browser
 
Hlucho said:
WiZARD said:
you may crete somthing self:
1) generate MD5 hash
2) assign this hash to IP
3) input data to MySQL
4) use date for live of yor session

This wouldn't solve the problem, because I need multiple different "sessions" for one IP. Those "sessions" started from one browser window. I want to start new session from link like
http://my_server.com/?new_session=yes&whatever=646565&whatever_else=hkjhkjh&....

AND at the same time keep all session info for the origin browser
I'm not sure what can do it....
see this session_start
maby better assign new session variable as propose magical swirlee huh?
from manual:
session_start() creates a session or resumes the current one based on the current session id that's being passed via a request, such as GET, POST, or a cookie.
 
WiZARD said:
I'm not sure what can do it....
see this session_start
maby better assign new session variable as propose magical swirlee huh?
from manual:
session_start() creates a session or resumes the current one based on the current session id that's being passed via a request, such as GET, POST, or a cookie.

The problem is that session_start() resumes session and there is no way to start new session without destoying the old one.

I tried to set new session id in link (_GET), change the _COOKIE, but it doesn't work
:(
 
Back
Top