You don't need to reinvent the wheel to offer downloads. There are a lot of existing scripts available that will do that in various ways, some free, some not. Why not download and try out a couple of the free ones and see if any of them work for you? http://hotscripts.com