Jump to content

track uploads?


Recommended Posts

My database is now working fine! thanks to all. However i have now set it up so that users can log in and upload files to my server. How can i automatically have a copy of their file names sent to my database perhaps with their user log on id also?I would appreciate some code if possible (iam currently using dreamweaver to write my pages)Thankyou...

Link to post
Share on other sites

Are you currently already storing the file names and user ids in your database? How are your users able to upload files and are they then able to view those files at a later time? If so, all the data that you need is probably already there. Give us some more information about your database structure and describe in more detail the process you are using to allow the users to upload files and we may be able to help.

Link to post
Share on other sites
Are you currently already storing the file names and user ids in your database? How are your users able to upload files and are they then able to view those files at a later time? If so, all the data that you need is probably already there. Give us some more information about your database structure and describe in more detail the process you are using to allow the users to upload files and we may be able to help.
I have created the user log in details in a database and these details are checked when they log into my page that allows them to then upload direct to my server. I now need a way of identifying the files uploaded by the different user in order to call them back into my database for users to view etc.I hope this makes a little more sense, thankyou.
Link to post
Share on other sites

Are you allowing them to upload files by presenting them with a form that has an input of type file and posts to some ASP page?

<form action="upload.asp" method="POST" enctype="multipart/form-data"><input type="file" id="uploadFile" /><input type="submit" value="Upload the file!" /></form>

Or are you providing them access to your site through an FTP program?If you are using ASP, are you keeping track of who is viewing the page? Either by placing a cookie on that person's computer or using Sessions?

Link to post
Share on other sites
Are you allowing them to upload files by presenting them with a form that has an input of type file and posts to some ASP page?
<form action="upload.asp" method="POST" enctype="multipart/form-data"><input type="file" id="uploadFile" /><input type="submit" value="Upload the file!" /></form>

Or are you providing them access to your site through an FTP program?If you are using ASP, are you keeping track of who is viewing the page? Either by placing a cookie on that person's computer or using Sessions?

Yes im using a form connected to an asp page. I have not included any cookies or sessions that im aware of so that sounds like the way to go? Thanks
Link to post
Share on other sites
Yes im using a form connected to an asp page. I have not included any cookies or sessions that im aware of so that sounds like the way to go? Thanks
That's right. In order to keep track of who is visiting a certain page, you have to store that person's UserID in either the Session or in a cookie. Then, when it comes time to save the file, you look at the Session (or cookie) to get the UserID and then you can insert a record in the database with the filename and the user's UserID.
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...