I have a table, called 'files', where I store file_id's. Basically, users on my website can upload files to my website, and when a user uploads a file, all that file's info gets uploaded to my table.
Anyways, I'm working on a file manager where the users may see all the files that they have uploaded, edit the name of the file, delete the file, etc.
How I've done this is, when the file is uploaded, the user's unique id is uploaded along with the row with the unique file id.
So all I have to do for my file manager is match up the user's id with however many rows have said user's id in them, then display each file on the file manager page.
What is the easiest way to do this?
This is as far as I've gotten. Not great, I know.
$checkfiles = mysql_query("SELECT * FROM repository WHERE userid = '$useridtemp'") or die(mysql_error());
$fileinfo = mysql_fetch_array($checkfiles);