Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Upload Progress Bar??? HELP!!!

    hey so i have a working PHP code for a upload form, but i wana make a progress bar for it. and yes, i KNOW that php can't do it, but i heard Java can. so whats the code?

    here is my existing PHP code:

    PHP Code:
     <?php
    $bad_types 
    = array('application/octet-stream','application/x-msdos-program','application/x');
    if( 
    in_array$_FILES['uploadedfile']['type'], $bad_types ) )
    {
        echo 
    "That File type is not supported.";
    }
    else
    {
    $target_path "uploads/";
    $target_path $target_path basename$_FILES['uploadedfile']['name']);
        if(
    move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
            echo 
    "The file ".  basename$_FILES['uploadedfile']['name']).
            
    " has been uploaded. here is the link to your file: <a href=uploads/".  basename$_FILES['uploadedfile']['name']). ">".  basename$_FILES['uploadedfile']['name'])."</a>";
        } else{
            echo 
    "There was an error uploading the file, please try again!";
        }
    }
    ?>

  • #2
    New Coder
    Join Date
    May 2006
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    please?

  • #3
    eak
    eak is offline
    Regular Coder eak's Avatar
    Join Date
    Jun 2002
    Location
    Nashville, TN
    Posts
    354
    Thanks
    0
    Thanked 26 Times in 26 Posts
    First of all, your in the wrong section. Javascript is not Java.

    I found this link a while ago and you might like it.
    http://www.raditha.com/php/progress.php
    eak | "Doing a good deed is like wetting your pants; every one can see the results, but only you can feel the warmth."


  •  

    Posting Permissions

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