Here is the php script for file uploads, view and download files using php and mysql. The script uploads file to server and stores file path in mysql database.
Read this post on kodingmadesimple.com