OK this is a good one and I know it can be done as I've seen it done with PHP on a shareware site (although I can't find that site now of course).
What I have is a PHP generated HTML form that allows users to choose from a list of dynamically generated files via standard checkboxes and then click a link that is marked as 'Get all selcted files in one zip file'.
This link is actually a form submit button that needs to run a PHP script to build the zip (this is easy - using Info-Zip on the webserver) and then present that zip file back to the user as if the link had been a HTML hyperlink to static zip file.
I.e. the user will still have the form/file selection page displayed, but will get a dialogue box in front of it saying the standard 'You have chosen to download a file of type zip - do you want to save it etc....
It is no problem if the page with the file selection/form refreshes. What I can't work out is how it was done on the site I saw as the form has to be submitted causing PHP to generate the zips and then some output is genrated to redisplay the form AND send the zip file. I can't work out how both these operations can occur on one page.
The only I can think is that it outputs the zip file to a new window with type 'zip' which may cause the window to not be displayed. Anyone got any ideas as I really want to make this a single click process rather than a double click.
All help would be appreciated.
Thanks,
Fes.