[UPHPU] Download a file and Reload page

Wade Preston Shearer wadeshearer.lists at me.com
Tue Apr 5 08:33:25 MDT 2011


On 4 Apr 2011, at 21:59, Justin Giboney wrote:

> http://pastebin.com/kBk68UsY

The issue is the forced download (CSV). Those headers don't cause the browser to refresh, but once you have passed them you can't pass the header that does (location). So, you have to refresh or leave the page before the download occurs. You could probably cobble together a solution with javascript that would refresh the page, but I think that the easiest solution is to leave it (not leave it as it is—move to another page). Then when the user returns the page is new. Instead of having upload_file.php output the file immediately, you could show a success screen with a link that they click to initiate the download. Or, you could separate the upload profess from the analysis form. Either way, you'll need change how you have architected things a little.


More information about the UPHPU mailing list