Jump to content

Archived

This topic is now archived and is closed to further replies.

ramram

making download.php help

Recommended Posts

I need help to set-up my MySQL database using php

I am trying to make a download.php which would let users to download files after 5 seconds.

The only problem is that my /download directory has many sub directory.

For example if someone wants to download FireFox, then firefox.exe is located in /download/FireFox/firefox.exe


and I want somewhat like this www.domain.com/download.php?fileid=firefox.exe as an output URL to download. I know that I can use MySQL and setup a nice database to do something like this as long as fileid is unique.


Any ideas on how to setup the MySQL database so that I can easily add multiple files from different sub directory at the same time.

Thanks for reading the topic. Have a good one.



Share this post


Link to post
Share on other sites
I guess in it's simplest format, you need a single table with three columns...

[b]Downloads[/b]
fileID - (int) unique/auto-increment
fileName - (varchar)
filePath - (varchar)

Regards
Huggie

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.