Another CGI question. Keeping an array over more than one Webpage.

Terry Vogelaar (de Mare) tvogelaar at de-mare.nl
Sat May 8 00:10:15 EDT 2004


jbv heeft op vrijdag, 7 mei 2004 om 15:06 (Europe/Amsterdam) het 
volgende geschreven:

> Malte,
>
>> Hi,
>> now that I´ve set everything up on my machine here I´m eager to play 
>> around
>> with the CGI stuff. Would it be possible to keep the values stored in 
>> an
>> array over more than one Webpage and manipulate that array on Page 1, 
>> Page
>> 2, etc? Do I need to use cookies for that?
>
> you can use temp files on your server, or hidden flds on your
> successive webpages with the post cmd.
>
> JB

Remember that the engine quits as soon as the file is processed. So 
while you read the results, the engine is not running anymore. When you 
save data to an array, it has to be a custom property as an array and 
you have to save the stack to keep the data. That data will remain 
there available for all users until it is erased or overwritten.

I also don't see any use for temp files on the server. Nice for hit 
counters and guest books, although these files are not really 
temporary. As soon as the site is viewed by two or more users 
simultaneously, these temp files will mix up data for each viewer.

Hidden inputs are indeed a good solution. That means that each transit 
to another file is a form submission. Also cookies are good.

Terry


More information about the use-livecode mailing list