Re: Two session for the same user, possible?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can have two scripts talking to the same browser session by setting 
different session cookie names. Depending on which script is being loaded it 
will look at a different cookie to find out the session ID, once again, I 
have not tried it, but there is no reason why it wouldn't work, and not 
require option 1, 2 or 3 as Chris mentions below. 

-Micah 


On Friday 22 October 2004 12:55 pm, Chris Gregors wrote:
> The session information is bound to the users computer and the browser
> they use.
>
> option 1: user logs into app using a different computer (2 laptops)
> option 2: user logs into app using a different browser (ie and firefox)
> option 3: sessions have a lifetime of one screen (aka no session
> persistance).
>
> I use option 1,2 all the time. One session is "godly" and the second
> session is a "luser" session.
>
> <c>
>
> -----Original Message-----
> From: Micah Stevens [mailto:micah@xxxxxxxxxxxxxxxxxx]
> Sent: Thursday, October 21, 2004 5:54 PM
> To: php-db@xxxxxxxxxxxxx
> Subject: Re:  Two session for the same user, possible?
>
>
>
> p.s. you can also designate a session ID. If you do this you may be able
> to
> have two sessions running concurrently. Never tried it myself, but it
> should
> work.
>
> -Micah
>
> On Thursday 21 October 2004 02:03 pm, Micah Stevens wrote:
> > The Session ID is the same, so it will access the same variables. If
>
> you
>
> > want to force a new session in the new script, do this:
> >
> > http://us2.php.net/manual/en/function.session-regenerate-id.php
> >
> > But this will in effect log the user out of the first session as well.
>
> If
>
> > you want to be able to do both, I suggest you use different names for
>
> your
>
> > session vars.
> >
> > -Micah
> >
> > On Thursday 21 October 2004 12:39 pm, Andre Matos wrote:
> > > Hi Matt,
> > >
> > > I have developed two different web systems that use php sessions.
>
> When I
>
> > > a user log into one system, the system creates a session and storage
>
> on
>
> > > it one object called UserSession with some information that I need
>
> while
>
> > > the user works with the system.
> > >
> > > My problem is when the user decides to open the second system
>
> without log
>
> > > out from the first one that he logged, using a new window (crtl+N)
>
> from
>
> > > the same browser. This second system creates also an object called
> > > UserSession, but with different properties and this new object from
>
> the
>
> > > second system overwrites the object from the first system. This is
>
> my
>
> > > problem. Can I make PHP understand that this is a complete different
> > > session?
> > >
> > > Thanks.
> > >
> > > Andre
> > >
> > > --
> > > Andre Matos
> > > andre.matos@xxxxxxxxxxxx
> > >
> > > -----Original Message-----
> > > From: Matt M. [mailto:h.dudeness@xxxxxxxxx]
> > > Sent: Thursday, October 21, 2004 3:23 PM
> > > To: Andre Matos
> > > Cc: php-db@xxxxxxxxxxxxx
> > > Subject: Re:  Two session for the same user, possible?
> > >
> > > > Is it possible to have two sessions for the same user in php? If
>
> yes,
>
> > > > how can I implement this?
> > > >
> > > > I am currently using one without problem. However, when I try to
>
> create
>
> > > > a second session, the first one is lost.
> > >
> > > could you post some code.  I am not sure I follow what you are
>
> doing.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux