You will have better luck on a forum for the language you want to use, this one is for C++ which is not really used for this type of work (unless you want to do it on the back end). There are lots of nice people here who might know and help you anyway, though :) I am of no use, last time I did web I used notepad because that was the cutting edge development tool for it and PHP was something you smoked.
To get the filename you need a form with an input element and a submit button.
Also might be a good idea to show a list of available filenames or maybe better show the filenames as links.