I have a page to register users information for request submitting.I want to save the user's information entered by user in each window individually and in a dedicated session for each browser window. I searched Google and stackoverflow but did not get a good result.

How should I generate unique session for every browser window by PHP?If set session with manual sessid is more secure?

1

There are 1 answers

3
deceze On

Since sessions (session cookies) are shared among all instances of the same browser, they won't help you. You will need to create unique URLs, so each window/tab can visit a truly different page. E.g.:

http://example.com/foo.php?id=abcdef123456789

Whether you treat this as unique page identifiers or as transporting the session id in the URL is up to you and what exactly you need this for.

Beware that an id transported this way is easily shared, possibly accidentally. It shows up in the browser history and can easily be copied and pasted elsewhere.