in reply to (jeffa) Re: Dynamic Page - AutoPOST
in thread Dynamic Page - AutoPOST

Thanks for the quick reply. I'm not sure if this will work. Each time the page is entered, a collection of new values is done. Then other values are calculated based on the "previous page's data". How will the values be passed ? The data is too large to use the standard "query string". David
  • Comment on Re: (jeffa) Re: Dynamic Page - AutoPOST

Replies are listed 'Best First'.
(jeffa) 3Re: Dynamic Page - AutoPOST
by jeffa (Bishop) on Jun 01, 2001 at 22:33 UTC
    Hmmm, if the data is indeed to large to slam into a query string, then you should look into saving the state of the form to a file. Take a look at the save() method in the docs for CGI.pm.

    The gist is to try to open the file and use it to create a new CGI object. After you set the new values, save the state to the file. This will not work if you plan on having different data available to different users, but if everybody is viewing the same results, it shouldn't be a problem.

    Don't forget to use flock on the state file.

    Jeff

    R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
    L-L--L-L--L-L--L-L--L-L--L-L--L-L--
    
      A POST could handle the large dataset. If there was a way to "REDIRECT" after "sleeping for x secs" to the same .CGI sending it the POSTED data. Could LWP Help ?
Re: Re: (jeffa) Re: Dynamic Page - AutoPOST
by merlyn (Sage) on Jun 02, 2001 at 20:55 UTC
    Then just pass an identifier, and use it to key into a server side lightweight database, like File::Cache. I show this in my latest columns in Linux Magazine, on creating an on-line quiz. The text of the columns won't be online for a couple more months though, because of the 3-month delay restriction.

    -- Randal L. Schwartz, Perl hacker