I have a form with a <select> box that I populate with filenames from a folder on the server using PHP. I want to go to the Force Download dialog box when the submit button is clicked for the file the user has chosen in the drop-down box.
My PHP skills (apart from the most basic uses) at this point involve a lot of hunting in books and online for code samples I can tweak. My problem is that every example I've seen of a force-download script requires the typed filename.
It seems really simple but but I'm having trouble. Is the filename already passed as variable in the _POST array? I currently using a GET method for the form.
Passing filename from drop-down box to a download.php
Moderator: General Moderators
Re: Passing filename from drop-down box to a download.php
If you use the get method then it will be in the _GET array.
Re: Passing filename from drop-down box to a download.php
Thanks for your help, but now I have anew problem. I've sorted out the filename problem, but now "file_exists" returns false.
My new post (because passing the filename is no longer the issue):
viewtopic.php?f=1&t=103370
My new post (because passing the filename is no longer the issue):
viewtopic.php?f=1&t=103370