Hi Sharriff,
be careful when saving to a file and reading it later, as many users
may run your CGI programs simultaneously. You should use some form of
inter-process synchronization to serialize access to your file. AFAIK
from REBOL you can reliably synchronize by opening TCP sockets or
renaming a file. I use these two functions:
obtain-semaphore: func [] [
loop 100 [
if not error? try [ rename %lockdir/lock %lock.locked ] [
return
]
wait ( random 5 ) / 10
]
print "Could not obtain semaphore"
quit
]
release-semaphore: func [] [
loop 100 [
if not error? try [ rename %lockdir/lock.locked %lock ] [
return
]
wait ( random 5 ) / 10
]
print "Could not release semaphore"
quit
]
--
Michal Kracik
[EMAIL PROTECTED] wrote:
>
> Does anyone have a soultion of persisting data across HTML pages? I want
> data submitted through a CGI from a HTML form to be usable in other pages.
>
> Many thanks for the anticipated help guys
>
> Sharriff Aina
> med.iq information & quality in healthcare AG