Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Session problem

  1. #1
    New Coder
    Join Date
    Nov 2006
    Location
    INDIA
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Session problem

    Hello

    I have a problem when dealing with sessions in php.
    I have hosted few application on same server.
    When i open 2 applications in the same browser, session values are shared.
    for example: i have application A and B. both the application has same authorization procedure but are connected to different database. After i login, the username and userid are shared between 2 application.
    If i log out from 1 application both are signed out automatically.

    how can i avoid it?

    Thanks in advance.
    -------------------------
    Shailesh Patil
    -------------------------

  • #2
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,555
    Thanks
    57
    Thanked 148 Times in 147 Posts
    long time since i've used sessions but im guessing its to do with you opening a new tab using the same browser? Well I believe thats the main jist of using sessions. If it is doing the same using a different browser ( which i dont think it will ) you could do something like;

    PHP Code:
    $_SESSION[md5($_SERVER['HTTP_USER_AGENT'] . $_SERVER['REMOTE_ADDR'])] = $val
    just thinking out loud.
    Website Design Mansfield
    PHP Code:
    function I_LOVE(){function b(&$b='P'){$b.='P';}function a($_){return $_++;}$b='P';define("B",'H');b($b=implode('',array($b=a($b),$b=a(B))));b($b);return $b;}
    echo 
    I_LOVE(); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •