[thelist] php sessions

Dunstan Orchard dunstan at 1976design.com
Tue Oct 15 05:40:01 CDT 2002

Hi there,

I'm a bit confused about php sessions; can I achieve what I want to do with

I have a script which either displays lightbox data, or shopping cart data
depending on the value of a variable called $lightcart.

Its value would be checked on every page, and could be altered on every page
(i.e. this isn't something I need to set once on one page and just read on all
the others).

The value of this session variable would alternate between 'lightbox'
and 'cart' depending on which of the links the user has selected to click.

A terribly simple mock-up (done by passing the variable values in the url) of
what I want to do can be seen here:

Now, can I do that _without_ setting cookies, using forms or having to include
the variable and it's value in the url? Are sessions, session variable and
their values just stored in the server's memory?

If that's the case, how would I set the value of this session variable by the
user clicking on something?

I'm finding the manual pages don't help me very much on this one...

thanks for any help (and could you cc me please?)

cheers - dunstan

Dorset, England

More information about the thelist mailing list