Hello php01,
I written some coding to over come this problem. I hope, it may help full for u. Download the script from below link. And then read this tutorial, to know what i did on code.
Note: Go through the downloaded code and read.
Source code:
http://www.splendidwebtech.com/code/dow ... script.zip
What i did is?
1) Connected DB with DB user name and password. Name database as 'download'
2) Design the form with file input box and submit button,
3) If file chosen and press the submit button, It will run set of code.
4) It will check whether file is empty or not, if empty, process will stopped otherwise it will continued with next process.
5) Check for extension, if its image file or PDF document, process will continued otherwise stopped,
6) Move the file from your PC to web server by using move_uploaded_file(). [Note: Check for file upload limit in web server].
7) Store the file name in database. [This used for downloading the file from server].
8 ) Upload process done.
9) Once file uploaded, It will shows as link below upload form for download. [File names will be listed by using MySql query with downloading link]
9) Once user clicked the file name, file will be downloaded from web server.
9) All process completed.
Please send me the feedback. I want to improve my coding standards.