jdavidw13
12-06-2002, 04:47 AM
Hi all,
Thanks for you help on the last question I asked. Well now I'm trying to find a way to refresh the page after the user downloads a file.
Well I have one script that lists the files that the user can download. When they click the download button, the user is directed to another script that does various things based upon the file they have chosen to download. In the second script I have this to auto-start the download.
...
header("Content-type: application/unknown");
header("Content-Disposition:filename=$homedir/$filetodownload");
readfile("$homedir/$filetodownload");
...
What I want to happen is the user gets sent to the second script, which outputs "thank you for your download" blah blah blah, to the web browser, then have the download file dialog box automatically pop up. What actually happends in the dialog box pops up, but the listing from the first script is still displayed by the web browser. The second script did run, because it did what it was supposed to on the server side, but it didn't output any html.
So what I need is a way to output html after this
...
header("Content-type: application/unknown");
header("Content-Disposition:filename=$homedir/$filetodownload");
readfile("$homedir/$filetodownload");
...
comes up in the second script. Or a way to refresh the first page after the download file dialog has come up. Any advise or tips would help.
Thanks
Thanks for you help on the last question I asked. Well now I'm trying to find a way to refresh the page after the user downloads a file.
Well I have one script that lists the files that the user can download. When they click the download button, the user is directed to another script that does various things based upon the file they have chosen to download. In the second script I have this to auto-start the download.
...
header("Content-type: application/unknown");
header("Content-Disposition:filename=$homedir/$filetodownload");
readfile("$homedir/$filetodownload");
...
What I want to happen is the user gets sent to the second script, which outputs "thank you for your download" blah blah blah, to the web browser, then have the download file dialog box automatically pop up. What actually happends in the dialog box pops up, but the listing from the first script is still displayed by the web browser. The second script did run, because it did what it was supposed to on the server side, but it didn't output any html.
So what I need is a way to output html after this
...
header("Content-type: application/unknown");
header("Content-Disposition:filename=$homedir/$filetodownload");
readfile("$homedir/$filetodownload");
...
comes up in the second script. Or a way to refresh the first page after the download file dialog has come up. Any advise or tips would help.
Thanks