Tracking Sessions in a Python CGI app.

A

Andrew Chalk

Is there a unique session ID created in a Python CGI app.?

If not, and I suspect not, what is the best way to keep track of the session
that loads each web page? I need to store form data from multiple forms
completed by the user. What is the best way to keep track of which user is
which?

Thanks!
 
T

Tim Roberts

Andrew Chalk said:
Is there a unique session ID created in a Python CGI app.?

No. Each transaction in a web server is separate. There is no concept of
"sessions".
If not, and I suspect not, what is the best way to keep track of the session
that loads each web page? I need to store form data from multiple forms
completed by the user. What is the best way to keep track of which user is
which?

One common way is to generate a random number as a session ID and send it
to the client as a cookie. Another way is to embed the session ID in a
<input type=hidden> field, but then you have to remember to carry that
forward in ALL the forms.
 
A

Andrew Chalk

Many thanks!
Tim Roberts said:
No. Each transaction in a web server is separate. There is no concept of
"sessions".


One common way is to generate a random number as a session ID and send it
to the client as a cookie. Another way is to embed the session ID in a
<input type=hidden> field, but then you have to remember to carry that
forward in ALL the forms.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top