Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 136,578 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,922 people online right now. Registration is fast and FREE... Join Now!




file upload script that lists files for download

 
Reply to this topicStart new topic

file upload script that lists files for download

BlueCube
1 Oct, 2008 - 10:49 AM
Post #1

THIS IS SPARTAAA
Group Icon

Joined: 19 Feb, 2002
Posts: 3,594


Dream Kudos: 70
My Contributions
Pretty basic, but I can't seem to figure out past just getting the files uploaded through all my searching.

I need to have a page where any user can upload a file (.pdf in this case) and type in a description.

For instance, they would go to ......./upload.php and upload "sample_article.pdf" with description "An article about worms"

One another .html page in a table would list all these....

Sample Article.pdf - An article about worms.
Sample Article2.pdf - An article about flys.

User should be able to click the link and download the .pdf. A client of mine wants to be able to upload tons of tons of .pdfs for these lists.

Any help is appreciated! My understanding of PHP is very basic, sorry.

edit: (yes, I read the tutorial http://www.dreamincode.net/forums/showtopic9797.htm, just need to figure out how to make it list those files)

This post has been edited by BlueCube: 1 Oct, 2008 - 10:50 AM
User is offlineProfile CardPM
+Quote Post

Hary
RE: File Upload Script That Lists Files For Download
1 Oct, 2008 - 11:12 AM
Post #2

D.I.C Head
**

Joined: 23 Sep, 2008
Posts: 205



Thanked: 15 times
My Contributions
It depends on how you want to store the descriptions. You can make a single file for it, or store it in a small database. I think the latter is the best, and the start is then to start a mysql tutorial
User is offlineProfile CardPM
+Quote Post

engale
RE: File Upload Script That Lists Files For Download
1 Oct, 2008 - 04:06 PM
Post #3

D.I.C Addict
Group Icon

Joined: 30 Sep, 2008
Posts: 549



Thanked: 2 times
Dream Kudos: 50
My Contributions
I would also create a small database for two reasons.
one: you can save the file name in the database (not the file just the name) and then use this to create the link to download the file.
two: you can have the database keep a display name while the file can be named anything else to prevent duplicate names copying over the other files.
User is offlineProfile CardPM
+Quote Post

CTphpnwb
RE: File Upload Script That Lists Files For Download
1 Oct, 2008 - 04:52 PM
Post #4

D.I.C Regular
***

Joined: 8 Aug, 2008
Posts: 383



Thanked: 23 times
My Contributions
This seems like it belongs in the Request a Service section of Projects.


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 12:18AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month