Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Tracking Sessions in a Python CGI app.

Reply
Thread Tools

Tracking Sessions in a Python CGI app.

 
 
Andrew Chalk
Guest
Posts: n/a
 
      09-04-2003
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!


 
Reply With Quote
 
 
 
 
Tim Roberts
Guest
Posts: n/a
 
      09-05-2003
"Andrew Chalk" <(E-Mail Removed)> wrote:
>
>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.
--
- Tim Roberts, http://www.velocityreviews.com/forums/(E-Mail Removed)
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
 
 
 
Andrew Chalk
Guest
Posts: n/a
 
      09-05-2003
Many thanks!
"Tim Roberts" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Andrew Chalk" <(E-Mail Removed)> wrote:
> >
> >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.
> --
> - Tim Roberts, (E-Mail Removed)
> Providenza & Boekelheide, Inc.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
tracking sessions panda ASP General 3 10-27-2006 08:34 AM
Cookieless Sessions (Sessions Without Cookies) and Security scottymo ASP .Net Security 3 09-29-2006 11:00 PM
Tracking Someone Tracking Me Edw. Peach Computer Security 4 07-07-2005 05:50 PM
tracking sessions mike parr ASP .Net 3 05-06-2004 11:25 AM
Re: Relationship between IIS Sessions and ASP.NET Sessions? Ken Cox [Microsoft MVP] ASP .Net 1 08-08-2003 03:22 PM



Advertisments