Basically, you could do something like this ...
Make sure your script has permissions set to allow file uploads.
Create an HTML form to POST your file, making sure you set the ENCTYPE to multipart/form-data. Add in a MAX_FILE_SIZE hidden field for good measure.
<FORM ACTION='myscript.php' METHOD='post' ENCTYPE='multipart/form-data'>
<INPUT TYPE='hidden' NAME='MAX_FILE_SIZE' VALUE='2000000'>
<INPUT TYPE='file' NAME='myfile'>
<INPUT TYPE='submit'>
</FORM>
Use the $FILES array in the receiving script to get the filename of the uploaded file.
$filename = $_FILES['myfilefile']['name']
Create your SQL query with the filename in it. Assuming your table has two fields, one called 'id' which is autoincrement INT and one called 'filename' which is VARCHAR of whatever length you need.
$sql = "INSERT INTO mytable (id,filename) VALUES (null,'" . $filename . "')";
Move the file to it's permanent location from the Temp file directory.
copy($_FILES['myfile']['tmp_name'],"/my/dir/$filename");
Connect to your MySQL server and issue the insert query.
Then, to view the file ...
Connect to the MySQL server and issue a query to get the row you want, then echo the HTML inside a <TEXTAREA> field.
This is a basic idea and certainly you need to do some error checking and validation and file cleanup. You also might consider random filenames as there could be problems with files with the same name.
If you don't need to have the files actually exist, you may also consider putting the HTML text right into your table and save the hassle of messing with files.