Robin said:
Is there a better solution to save data over a session? I am useing
forms and two asp scripts which will be called alternatly - and this
two scripts are needing the same data.
Better solution to what? Please quote some context.
I assume you mean to storing in $Session? If the data is not critical to
anything (i.e., it doesn't matter if it gets tampered with), there's no
reason not to just write it out to hidden input fields. Just don't rely on
the data staying valid between requests and always double-check that it is
valid. The benefit is that you don't have to store the information on the
server, which means less in memory.
It's also nice to think that sites should work perfectly for you if you turn
off cookies, but that's a pipe dream (few do). If you want to require your
more anal users to turn them back on, you can use that method, but again
it's open to tampering.
On the server side you could store the information to a database rather than
keep it in memory. The overhead is slightly higher than using a session but
you can have one database sitting on a separate server on the backend that
all your servers can access.
There's also no reason not to use sessions. It can be quite handy for
keeping people from tampering with information you don't want tampered with.
You can set the id to identify the person with in your database and never
send it to the user, for example. I think the general rule of thumb is that
session should only be used for data that really needs to persist for the
duration of the user's visit (i.e., don't store form data in it that's just
going to a database at some point or that you feel like collecting in
stages).
None of this has much of anything to do with Perl in particular, though, so
if you want more information I would suggest posting your question to
comp.infosystems.
www.authoring.cgi.
Matt