Php file upload


i am working on a website in which there are two categories of user i.e. buyer and provider.

now i want to make a file upload script such that when provider upload a file it should come directly to the buyer page.

any one knows if this possible to do and how.



It is possible to upload files with PHP and also to display said file for any page to display, but there are numerous variables you have to take into account.

Could you provide a little more information on the type of files providers will/can upload (images, PDFs, .zip files, etc.) and how you want them displayed to the buyers?

well right now there is no such specific condition for the type of i mean to say that user can upload any file he wants , but he should atleast be able to upload .zip .rar .doc .pdf files

It’s certainly possible and uploading files is not that difficult.

Since you’re asking for a script I assume you already have the html form set up. The w3schools website has a good demo script.

I would suggest storing all the physical files in a designated area on the server and store only the file’s meta data (filename, mime type, path, blah blah) in the database. You can then dynamically generate links to the uploaded files on the buyer’s page using the meta data in the db for the buyers to access the files as soon as they are uploaded.