August 30th, 2003, 08:19 PM
How to create a file upload page??
Alright, I created a website, www.fearlessperformance.com and I would like my friends to be able to upload new pictures and videos directly to the site. I'm trying to figure out how I create an upload page that will let them select files from their hard drives and upload them to a folder on the site. I want to be able to restrict the file types to only allow for picture or video files. Where do I being? My server supports MySQL, and PHP if that makes any difference. Also I am using Dreamweaver MX v.6. Any information you can give would be great.
September 1st, 2003, 06:19 PM
You will need to create a <form> with enctype="multipart/form-data" as a parameter. In your form you will need a <input type='file'> box which will allow them to browse their drive and select.
You will have to validate the file type in your cgi script because enctype="multipart/form-data" doesn't allow client-side validation (not that I have been able to make work). Then you will need a Perl or PHP script on your server to upload your file.