If it is using php/mysql then for definate you want to store the files in a seperate folder on your server. (Possible password protect this directory) then in mysql, create a docs table, store the filename in here and add a docid PK AI just in ase you get the same filename twice.
if you want to store in the database check this out:
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: