Tracking Sessions in a Python CGI app.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrew Chalk

    Tracking Sessions in a Python CGI app.

    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!


  • Tim Roberts

    #2
    Re: Tracking Sessions in a Python CGI app.

    "Andrew Chalk" <achalk@XXXmagn acartasoftware. com> wrote:[color=blue]
    >
    >Is there a unique session ID created in a Python CGI app.?[/color]

    No. Each transaction in a web server is separate. There is no concept of
    "sessions".
    [color=blue]
    >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?[/color]

    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, [email protected]
    Providenza & Boekelheide, Inc.

    Comment

    • Andrew Chalk

      #3
      Re: Tracking Sessions in a Python CGI app.

      Many thanks!
      "Tim Roberts" <[email protected] > wrote in message
      news:615glvs9fv cop06i73iqjtri0 [email protected] om...[color=blue]
      > "Andrew Chalk" <achalk@XXXmagn acartasoftware. com> wrote:[color=green]
      > >
      > >Is there a unique session ID created in a Python CGI app.?[/color]
      >
      > No. Each transaction in a web server is separate. There is no concept of
      > "sessions".
      >[color=green]
      > >If not, and I suspect not, what is the best way to keep track of the[/color][/color]
      session[color=blue][color=green]
      > >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[/color][/color]
      is[color=blue][color=green]
      > >which?[/color]
      >
      > 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, [email protected]
      > Providenza & Boekelheide, Inc.[/color]


      Comment

      Working...