|
Posted by Dikkie Dik on 05/10/06 00:23
A session is like a shopping cart or a theater's wardrobe. It is a piece
of storage assigned to a visitor.
What you put in a session are mostly things that should remain on the
server, because you do not want the visitor to be able to mess with it.
For instance, a login function can return a role, that determines access
rights. You can store this role in the session, but you do not want to
store it in a hidden form variable in HTML.
Sessions in PHP are not fundamentally different from those in .NET.
There is a session array that can be filled with anything serializable
and in some cases more.
So you do not have to store every query result, but a session can be a
good place to store intermediate results that are needed later. Sessions
are the "trick" that make a bunch of stateless http-calls look like a
continuously running web application.
Best regards
jantox@gmail.com wrote:
> Good day,
>
> We have some Java programmers in our software dev, and they are
> pressuring us to use Sessions to store data and use that Session to get
> query data. They say that it is ok since it is like Entities in Java. I
> am baffled as a .NET programmer, we tend to avoid using sessions and
> instead use DataSet, is there any equivalent of dataset in PHP?
>
[Back to original message]
|