creating an upload page on my site...

Discussion in 'OT Technology' started by SiliconTrance, Aug 11, 2003.

  1. How would I go about doing this? I have my site which is a tutorial site and I would like to have a page for users to upload .zip files (around 500kb) to my ftp site where I will be able to review them and download them when I feel like it.

    I guess I just need to know some basics on how this would work. My pages are running using php, so if it can be done using that, it would be even better.

    if you can help me out, that would be great! thanks in advance.
  2. crotchfruit

    crotchfruit Guest

    check out about halfway down there is a heading "The type="file" Attribute". this section has the info you need to make the html-side work.

    as for the php end, do you know how to get GET and POST data already? basically, if your file field is named "userfile", i.e.:

    <form method="POST"
    <input type="file" name="userfile">
    <input type="submit">

    in your upload.php script you would just access the $_FILES['userfile'] variable to get the file information. more documentation on this is here:
  3. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Apr 27, 2002
    Likes Received:
    Edmonton, AB
    Yep, it's very easy in PHP actually, I just did it for work this week. Only trouble I ran into is using $_FILE instead of $_FILES :doh:

Share This Page