#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    64
    Rep Power
    11

    Question 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.
    Thanks,
    Michael
  2. #2
  3. No Profile Picture
    *foo = *bar;
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Wheaton, IL
    Posts
    179
    Rep Power
    44
    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.

IMN logo majestic logo threadwatch logo seochat tools logo