in reply to CGI Application and global variables (from a database)

Please show some code, because I can't figure out what you are actually trying to do.

Please note CGI programs run once for every request and then exit, which means that all variables will be uninitialized unless you set them, even if you set them some time ago for another request.

Also, how is your program supposed to know when the value in the database has changed without querying the datase first? You might as well just get the data from the DB for every request.

Joost.

  • Comment on Re: CGI Application and global variables (from a database)