PHP Forums Archive

php download from a drop down box

Tags: upload, download

kturnbull4 posted on 2011-01-13 19:13:54 #

hi, i have a php script that uploads files to a folder on my server called upload. I then use another script to display the contents in a drop down box.

This works fine but how can i make so when i choose a file from the drop down box I can save it or open it in its own program but would prefer to save the file.

Thanks any script would be helpful.

Kev

Comments / discussions

Olaf posted on 2011-01-13 19:42:47 #

Do you tried this upload / download demo?

Is this the function you need?

kturnbull4 posted on 2011-01-13 19:52:10 #

hi olaf i have tried the downloader but im not sure what im doing wrong. but i get this error

Parse error: parse error, expecting T_STRING' orT_VARIABLE' or `T_NUM_STRING' in D:\HostingSpaces\kevintur\kevinturnbull.com\wwwroot\girls\download.php on line 14

I have got the upload part working but it is a different script to yours. It displays the files in the dropdown box but i cant download them it just gives me a file not found error.

kev

Olaf posted on 2011-01-13 19:56:28 #

check my previous post, is my demo the function you need :)

kturnbull4 posted on 2011-01-13 19:58:19 #

yes but only the download script but i get these errors when parse

Parse error: parse error, expecting T_STRING' orT_VARIABLE' or `T_NUM_STRING' in D:\HostingSpaces\kevintur\kevinturnbull.com\wwwroot\girls\download.php on line 14

kturnbull4 posted on 2011-01-13 20:07:17 #

any ideas as new to php?

cheers kev

Olaf posted on 2011-01-14 05:21:39 #

I don't asked you about the script error you have, but is this function on my demo page the effect you need? We fix the error on step 2 :)

scnister posted on 2011-07-27 05:10:12 #

Olaf,
I'd like to thank you for being willing to share your knowledge and also for your patience as I'm sure some of my questions are pretty basic. In searching for how to make a php download page for my website I came across your upload/download demo page at http://www.finalwebsites.com/demos/php_file_upload.php. The download dropdown box and the way it auto populates is exactly what I want for my website. I'm very new to working with PHP. This is also the first time I've worked with RVSitebuilder as the software for building my site. I've tried to follow the instructions on the demo page, but I'm having a following what's happening and how to implement it. Do you have some other tutorials on how to work with the download script? Or possibly some step-by-step tutorials and how to duplicate the functionality of the download portion of the demo page?

Olaf posted on 2011-07-27 08:32:00 #

Please open a new topic for your question