views:

1574

answers:

2

Right now I have a php form that forces a download of a zip.

How can I redirect to another page and also force that download (where the download is actually php zip)?

Would I use javascript?

any ideas?

Thanks!

A: 

You could do something like this in your download redirect:

Header("Location: downloadscript.php?filename");

Good luck!

Ian P
+3  A: 

You can't do both on the same page : force download the file (using the Content-disposition header) and redirect the user.

One thing you could is use JavaScript to open a new window to the download age when clicking on a link, and then redirect the user to an other page after a few seconds.

Wookai