if i am uploading files to a directory... using a simple PHP file upload script... how do i put that info into MySQL for creating href's for later downloading those files-- to d/l w/out a need previous knowledge of their location or name?
in plain English-- i made this for my band mates and i to share music for rehearsal via mp3 upload/ download. obviously, if member Joe uploads file, member John knows not where it is, or what it's called. i want member John, without pre-notification from member Joe, to be able to browse our site, recognize a new file is available for download, and to be able to simply click it and get the file. there needs to be no passwords or verification here (although i realize that sort of thing is always a good idea)-- i'm only concerned w/ the very PHP function() which will i'll use to show that new file and present it for download.
the way i see it, i have at least one option, and maybe two (i'm sure there's more!):
in the upload script file itself, provide a form for a filename $_POST data. that data goes into mysql, logged w/ an auto_increment id, and there's my record of that file-- which i know how to write code to find that data in the table.
let some PHP function check the filename of the file being uploaded and enter it w/out user intervention into my table.
i'd prefer the latter, but i can live w/ the former.
is there anything else that i should be taking into account also?
to be honest, although i'm confident that i can allow unlimited access to this upload / download to my bandmates, i would p/w user authenticate if i knew how to do it. it's just yet another of the many little things i have yet to cover. please, if you advise it's worth it for me to take the time to learn the whole user validation process to secure this file transfer process, i'd like to hear what you have to say.
thanks!!!