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

Pierre Sahores psahores at easynet.fr
Fri May 7 09:46:18 EDT 2004


Le 7 mai 04, à 15:06, jbv a écrit :

>
>
> 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

Hello,

The second way you describe, JB, (the use of "<hidden>...</hidden>" 
tags in the posted Form) is the first i would recommand if the cgi/app 
need to interact with lots of clients in concurrent access mode. If 
needed, this way lets us crypt - encode/decode - the hidden tags 
contents from the server-side cgi/app, if we wants to preserve those 
datas from beeing viewed, on the client side, by reading the form 
source code.

About using globals on the server-side : be carefull to separe them in 
3 different classes of globals (with no care about their contents and 
structure - arrays, not arrays). The first category of globals have to 
handle the cgi/app environment vars (forms headers and masks, lists of 
users access authorisations, etc...) to be loaded when the cgi/app 
starts, the second category of globals will contains the main incoming 
posted requests values - as "postedtag1=value1&postedtag2=value2, 
etc... - you can decode in as many as you need "subvars" to handle the 
main global of thoses posted requests values, the third category of 
globals will have to handle the datas to be replyied over the web or 
lan to the final client-side user. In handling the code trough this 
method, we are able to prevent any possible difficulties about the 
concurrent access requests.

About using temp files : because a read/write proc is always slower 
than getting/setting a global var, i avoid, for my own to use temp 
files.

Best, Pierre
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
-- 
Bien cordialement, Pierre Sahores

100, rue de Paris
F - 77140 Nemours

psahores+ at +easynet.fr

GSM:   +33 6 03 95 77 70
Pro:      +33 1 41 60 52 68
Dom:    +33 1 64 45 05 33
Fax:      +33 1 64 45 05 33

Inspection académique de Seine-Saint-Denis
Applications et SGBD ACID SQL (WEB et PGI)
Penser et produire "delta de productivité"



More information about the use-livecode mailing list