Results 1 to 3 of 3

Thread: File Upload

  1. #1

    Thread Starter
    Lively Member DJ P@CkMaN's Avatar
    Join Date
    Jan 2002
    Location
    Burpengary, Queensland, Australia
    Posts
    95

    File Upload

    hey all,

    would anyone be able to help me either make a file upload script(preferably) or if thats hard (im VERY new to PHP) tell me where i could get an easy to use one??

    thanx
    There's something I've noticed in the last year or so...
    Australian's are good at EVERYTHING !!!

  2. #2
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    really this isnt too complicated.

    PHP Code:
    if (isset($_POST['submit'])) {
      
    $fileUploadCopy $_FILES['filename']['tmp_name'];
      
    $fileUpload $_FILES['filename']['name'];
      
    $imageName $fileUpload;
      if (
    $fileUploadCopy != "none")
        
    copy($fileUploadCopy,"directory/$imageName");
    } else {
      echo 
    "<form method=\"post\" action=\"?\" enctype=\"multipart/form-data\">" .
              
    "<input type=\"file\" name=\"filename\">" .
              
    "<input type=\"submit\" value=\"upload\" name=\"submit\">";

    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

  3. #3
    New Member
    Join Date
    Jan 2002
    Posts
    5
    How do you check if the file exist?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width