Title: Session Management Magic

OK Folks,  I realize that sessions management is 'magic' but I really want to know how it works. First some background

I've got session working with mySQL.  I can see the cookie in my browser and it matches up with a record in the sessions table.

My table looks like so:

+-----------+-------------+------+-----+---------+-------+

| Field     | Type        | Null | Key | Default | Extra |

+-----------+-------------+------+-----+---------+-------+

| id        | varchar(32) |      | PRI |         |       |

| a_session | text        | YES  |     | NULL    |       |

| givenName | varchar(20) | YES  |     | NULL    |       |

+-----------+-------------+------+-----+---------+-------+

I have 2 test files, very simple and straight forward.  These work fine.

==================

- IN.html

   [-

      $req = shift;

      $udat{givenName} = "john";

   -]

==================

- OUT.html

   [-

      $req = shift;

   -]

   [+ $udat{givenName} +]<br>

   [+ $udat{_session_id} +]

==================

However if I modify the files as described below, it also works and I don't know why? 

NOTE: I haven't modified the table to add an additional field.

==================

- IN.html

   [-

      $req = shift;

      $udat{givenName} = "john";

      $udat{surname} = "smith";

   -]

==================

- OUT.html

   [-

      $req = shift;

   -]

   [+ $udat{givenName} +]<br>

   [+ $udat{surName} +]<br>

   [+ $udat{_session_id} +]

==================

When I load IN.html and then OUT.html a second time, I get the value for 'surName', but I'm not sure where it's coming from?  Can anyone explain?

Thanks.



*****************************************************************
<<>>

In compliance with applicable rules and regulations, Instinet
reviews and archives incoming and outgoing email communications,
copies of which may be produced at the request of regulators.
This message is intended only for the personal and confidential
use of the recipients named above. If the reader of this email
is not the intended recipient, you have received this email in
error and any review, dissemination, distribution or copying is
strictly prohibited. If you have received this email in error,
please notify the sender immediately by return email and
permanently delete the copy you received.

Instinet accepts no liability for any content contained in the
email, or any errors or omissions arising as a result of email
transmission. Any opinions contained in this email constitute
the sender's best judgment at this time and are subject to change
without notice. Instinet does not make recommendations of a
particular security and the information contained in this email
should not be considered as a recommendation, an offer or a
solicitation of an offer to buy and sell securities.

*****************************************************************

Reply via email to