Sessions for Multiple Logins account
How does Sessions structure should look like for multiple logins?
There will be three parts of logins on my website.
/ (customer area)
/admin/ (backend/admin area)
/control-panel/ (control panel area)
You can not use same account to access all three.
I came up with like this:
$_SESSION['login']['frontend']开发者_如何学JAVA = array(
'user_id' => 123,
'is_logged' => true
);
$_SESSION['login']['backend'] = array(
'user_id' => 999,
'is_logged' => true
);
Is this correct or what is alternative solution?
Look's perfectly fine to me. :)
精彩评论