473,321 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

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!
Jul 18 '05 #1
2 2536
"Andrew Chalk" <ac****@XXXmagnacartasoftware.com> 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, ti**@probo.com
Providenza & Boekelheide, Inc.
Jul 18 '05 #2
Many thanks!
"Tim Roberts" <ti**@probo.com> wrote in message
news:61********************************@4ax.com...
"Andrew Chalk" <ac****@XXXmagnacartasoftware.com> 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 sessionthat 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 iswhich?


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, ti**@probo.com
Providenza & Boekelheide, Inc.

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Shanfeng Cheng | last post by:
I write a piece of code to tracking the number of clicks on a link each day. The link usu. gets about 3000-6000 clicks per day. I just store today's click count in a one-line text file, like, ...
1
by: AJ | last post by:
Hi all I've just written a VERY simple shopping cart system for my own joy and edification as much as anything else. Mostly it was an exercise in learning about sessions but I want to keep...
2
by: marslee | last post by:
I want to prevent non-registered users to view a page in my website, For example, when a non-registered user clicks the history page, the website site refuses to go there since he is not...
6
by: Tran Tuan Anh | last post by:
Hi all, I am new to Python and desperated to look for a good Python debugger. I mean a debugger with source coding tracking. For C/C++, emacs and gud offers execellent development env. The...
2
by: David Frauzel | last post by:
I'm writing a rough draft of a suite of small Perl apps that will, combined, serve as a web site's user sign-up, login, management, and customized content engine. I'm having trouble with the...
0
by: Ben Fidge | last post by:
Dear All I've got a javascript occuring on a live site but cannot recreate it using my version of IE 6!! And therefore cannot debug it! Our site is http://cobas.co.uk The error I'm getting...
2
by: runner7 | last post by:
Can anyone tell me if there is a way in PHP to determine when a session times out on the server or how many concurrent sessions there are in your application?
4
by: moogyd | last post by:
Hi, (Off-topic) I am looking to put an open-source bug/issue tracking system in place for our current project (eventually expanded for all projects), and would appreciate any...
10
junior29
by: junior29 | last post by:
Hi, I just wondered if anyone could help me at all. I'm doing a piece of coursework building a social network (which is getting there!), we are supposed to add an administration element to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.