[EMAIL PROTECTED] wrote:


I'm getting a new id with every refresh click; so, how am I suppose to
know it is the same session? Here's my code:

The behaviour is the right one, I'll tell you now why is not what you would expect...
The session object is intended to provide persistancy to your application. Actually persistance is obtained using a datasource (a file in caso of Apache::Session::File). Each time a new request is evaluated the proper session file is opened and the session object is restored to its previous status provided a way to identify it => the session id.
This means that the only information that needs to travel among subsequent requests of your workflow is the session id.
It the session id is not propagated through subsequent requests, a new session object is created (and that's exactly what your script is doing).
A solution is to keep session ids in the cookie section of the request header and to know how to manage them look at the examples in the perldoc documentation of the Apache::Session.
Anyway , pressing the refresh button of your browser is not the preferred way to implement a workflow....
You should implement a simple GET/POST request from your page.
Session ids are carried transparently by cookies (once you instructed a cookie to do that), so you don't need to add special effort in the page code.
-M.






Reply via email to