Tracking Sessions in a Python CGI app.

Discussion in 'Python' started by Andrew Chalk, Sep 4, 2003.

  1. Andrew Chalk

    Andrew Chalk Guest

    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!
     
    Andrew Chalk, Sep 4, 2003
    #1
    1. Advertising

  2. Andrew Chalk

    Tim Roberts Guest

    "Andrew Chalk" <> 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,
    Providenza & Boekelheide, Inc.
     
    Tim Roberts, Sep 5, 2003
    #2
    1. Advertising

  3. Andrew Chalk

    Andrew Chalk Guest

    Many thanks!
    "Tim Roberts" <> wrote in message
    news:...
    > "Andrew Chalk" <> 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,
    > Providenza & Boekelheide, Inc.
     
    Andrew Chalk, Sep 5, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ken Cox [Microsoft MVP]

    Re: Relationship between IIS Sessions and ASP.NET Sessions?

    Ken Cox [Microsoft MVP], Aug 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    5,366
    Luther Miller
    Aug 8, 2003
  2. mike parr

    tracking sessions

    mike parr, May 6, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    408
    Patrice
    May 6, 2004
  3. scottymo
    Replies:
    3
    Views:
    702
    Dominick Baier
    Sep 30, 2006
  4. panda

    tracking sessions

    panda, Oct 25, 2006, in forum: ASP General
    Replies:
    3
    Views:
    112
    Anthony Jones
    Oct 27, 2006
  5. Bookham Measures

    Moving from ASP Sessions to Database Sessions

    Bookham Measures, Jul 23, 2007, in forum: ASP General
    Replies:
    19
    Views:
    565
    Bookham Measures
    Aug 23, 2007
Loading...

Share This Page