Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

What is the best way to maintain state in a CGI script?

by Anonymous Monk
on Sep 28, 2000 at 03:13 UTC ( #34301=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I was curious as to what method people use to maintain session information in CGI scripts. When a user goes from page to page on my site, each page is processed by a cgi script. What is the best way to maintain state and login information? Should I create a file that contains a random key along with the user login and use that to carry state information? Or should I add a row to a database table for each user in maintaining state? In other words, is database access or file access going to be faster?

Thanks,
Tom

Originally posted as a Categorized Question.

  • Comment on What is the best way to maintain state in a CGI script?

Replies are listed 'Best First'.
Re: What is the best way to maintain state in a CGI script?
by merlyn (Sage) on Sep 28, 2000 at 03:15 UTC
Re: What is the best way to maintain state in a CGI script?
by Russ (Deacon) on Jan 12, 2007 at 00:10 UTC
Re: What is the best way to maintain state in a CGI script?
by AgentM (Curate) on Sep 28, 2000 at 08:07 UTC
    Take an example from Perlmonks.org: one monolithic perl script (and that funky last node thang!)

    Originally posted as a Categorized Answer.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://34301]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2022-07-03 06:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?