in reply to lines per page

ok. i'll look into that solution. i was thinking every time the script runs it can just take 20 lines out of the array and store it in a separate array, then print the first, and pass the second. then each time it runs, the array will get smaller and smaller till it's finished. i would have to maintain state to do that?

Replies are listed 'Best First'.
Re: Re: lines per page
by BUU (Prior) on Apr 28, 2002 at 08:14 UTC
    yup. (unless you get into nasty complicated threads and ports and sockets and so forth). See, the web browser will hit the cgi, get the first 20 lines, the cgi will print the first 20, do something with the next 20, then die, the browser will then hit the cgi, get the next 20.. I would suggest (like above) (ab)using the magical $. var, but use it as a query string instead of a hidden field, blah.cgi?pos=20; as this is much easier to change, and advanced users can see whatever part they want..