Karina,

If this is the problem you are getting and you can't find a way around it,
you could start the session on a splash or index page so that when you move
from that first page into the main part of the website, the session has
already been started and all session variables are available.

This is more of a quick-fix than a techncal solution, but it should work.

After experimenting with using session id's to track users I opted for using
cookies.  Not because I was having too many problems with sessions, but more
for the benefits that I could get using cookies in that particular
application.

Cheers the noo,

Derek



----- Original Message -----
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Karina" <[EMAIL PROTECTED]>
Cc: "Derek Mailer" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, October 03, 2001 5:50 PM
Subject: Re: [PHP] Sessions Variables and refresh pages


> Both of SID and session_id() should return the current session id after
> session_start() has been called.
>
> -Rasmus
>
> On Wed, 3 Oct 2001, Karina wrote:
>
> > Yes, it is.
> >
> > This is exactly the problem. Do you know a way to solution this ?
> >
> > Thks, Karina
> >
> > ---------------
> >
> >
> > I'm not sure I fully understand the problem, but I think I can
> > have a guess
> > at it based on my past experiences...
> >
> > if you have a php page that starts a session with
> > session_start() and, say
> > for example, you then try and echo the session id with
> > session_id() it will
> > not be displayed on screen until you actually refresh the page
> > or move to
> > another page that calls the session id.
> >
> > In other words, the session id seems to be set when the session
> > is started,
> > but isn't availale to use in your script until the page is
> > re-loaded.
> >
> > This is based on what I can remember from 8 months ago and I
> > haven't tested
> > it out, but I believe this is the sort of problem being
> > described in this
> > thread.
> >
> > Cheers the noo,
> >
> > Derek
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



**********************************************************************************
This e-mail (and any attachment) is intended only for the attention
of the addressee(s). Its unauthorised use, disclosure, storage
or copying is not permitted. If you are not the intended recipient,
please destroy all copies and inform the sender by return e-mail. 
This e-mail (whether you are the sender or the recipient) may be 
monitored, recorded and retained by Business Information 
Publications Limited (BiP). E-mail monitoring/ blocking software 
may be used, and e-mail content may be read at any time.You 
have a responsibility to ensure laws are not broken when composing 
or forwarding e-mails and their contents.
**********************************************************************************


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to