The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End php download multiple files problem. Reply To: php download multiple files problem.


What could cause the php script to not work when the filenames are passed from Javascript but the php script does work when hard coded into the script?

First thought would be that you’re not getting the value you expected from your javascript. Have you checked (e.g., echo $_POST['files'];)?

Just briefly looking over that script, I don’t see anything glaringly wrong. Do you get any errors (and are you checking for errors/ is PHP configured to report errors)?

As an aside, GET is the appropriate method for file downloads.