ok this has helped alot and I found the source of my problems.
However I have another question now:

once created I pass the session ID through the URL. I also have some
variables defined within this session and I would like to be able to access
those on the subsequent pages until I kill the session. Sofar I had no
success.
I tried using the session_name("foo"); on the page where I initially create
the session and then using the same session name on the subsequent page
before I do session_start();
because I read somewhere that this is how you access your already created
session, without creating a new one, but this has failed sofar.
A new session is created and I can't access my old variables obviously.
What am I doing wrong?
Please, understand that I am fairly new to PHP so these may be stupid
questions, but I need to learn this somehow.
Thanx,
Iggy




"Neil Smith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 01:14 04/04/2003 +0000, you wrote:
> >Now my understanding of sessions may be
> >wrong, but I though when you kill a session the id is killed as well.
>
> It is.
>
> Your session is held by passing a 'session cookie' (not stored) on every
> request to the server. That session cookie is dropped when you close the
> associated browser window, and basically just contains your session ID.
>
> >that would mean when I refresh the page, a new id should be generated.
>
> No, it wouldn't, *or* shouldn't. That is how it's supposed to work :: The
> session is active till you close that browser window, because that window
> is passing the session ID up to the server until its closed.
>
> This also applies to any windows spawned *from it* -- by pressing Ctrl +
N,
> using window.open in javascript, or  using the _blank target in an anchor
> or form tag etc.
>
> >Unfortunately this does not happen and I can't figure out why. Only
> >after I shut all browser windows down, I get a new id and then the same
> >story again.
>
> Correct, that's how it works. Not necessarily *all* windows though - open
> them by clicking the browser icon in the taskbar & it'll work fine, but I
> bet you're opening new windows from the existing browser window, which
then
> gets them all the same session ID.
>
> >Now, I know that the damn session is erased from the temp folder because
>
> Correct. And cause its a session cookie, its not stored on your cookies
> folder, either.
>
> >I see it happen, however the id sticks to the browser for whatever
> >reason. I am running php4.2.3 on w2k pro and IIS
>
> HTH
> Neil Smith.
>
>



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

Reply via email to