php - How to keep two sessions at a time for a single page? -


I have an online service tool where users themselves register and use it.

I have a control room for this service. Sometimes when users tell us some strange things about data and usability, then we need to check that they are entering ...

So I have a page 'xx user' in the admin panel where xx is a user of our service ..

I just set the session variable for that particular user account and Login Options Byeep When I finished the trial, I logged out and logged in again

But now I do not need to logout and then when I log in as a different user I have to log in as an administrator. I can set one in two simultaneous sessions? Time for a page / service ???

(i.e.) I work as an administrator in a tab in the browser, and do I work as a user in another tab?

Any thoughts ..

I remember that they have used PPBB ...

The session is available worldwide, you can do different front and backend sessions like this:

  & lt ;? Php $ _SESSION ['Front'] ['Log In_ID'] = True; $ _SESSION ['backend'] ['login_id'] = false; ? & Gt;  

Your script will help me give you a more detailed sample code.

Update

  1. Add prefix to your set sessions like this: $ _ session ['my_CID'] = $ cid;
  2. You have to dig into the backend / admin code and know what the logout action is like.
  3. This action may be hitting the entire session this way: session_destroy () or unset ($ _ session); .
  4. Do not use the code given below to kill prefixed sessions.

Here's the code:

   

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -