Writing in two sessions from the same file (PHP)
Posted
by bellesebastien
on Stack Overflow
See other posts from Stack Overflow
or by bellesebastien
Published on 2010-06-02T22:49:59Z
Indexed on
2010/06/02
22:54 UTC
Read the original article
Hit count: 267
Hi,
I want to make it possible for the administrator to log in as a fontend user from the backend. Right now I'm using two sessions (sessions with different names), one for the admin and one for the frontend.
Is it possible to write in the first session, close it and then open a new session?
This is a simplified version of what I attempted but failed:
session_name('admin_session');
session_start();
// use first session without generatring any output
session_close();
session_name('frontend_session');
session_start();
// use the second session
Thanks.
© Stack Overflow or respective owner