Re: Session variables

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

 



A Session is stored on the user browser in a session ( in memory cookie) and on the server as a file. The session mgmt tools will read the file as needed.

Bastien

Sent from my iPod

On Feb 7, 2009, at 1:58, Paul M Foster <paulf@xxxxxxxxxxxxxxxxx> wrote:

I'm not too clear on HTTP headers, cookies, and such. So here are
questions related to that. Let's say I generate a random number that I
want the user to enter in a form. When I generate the number, I store it
in a session variable ($_SESSION). When the user submits the form, I
check the number they enter with what I've stored in the session
variable.

Since this session variable survives across page loads (assuming
session_start() is appropriately called), how is it stored and recalled?

Is it automatically stored as a cookie on the user's system?

Or is it stored on the server?

And how does a server "get" a cookie?

Is it a separate request made by the server to the client?

If the value I've asked the user for is *not* stored as a cookie, then
is it passed as part of the HTTP submission or what?

Thanks for any enlightenment on this.

Paul
--
Paul M. Foster

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


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux