Progress Bar for FileUpload

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jphilpot
    New Member
    • Jul 2010
    • 1

    #1

    Progress Bar for FileUpload

    Hello,

    I also am a newb and need help getting the percentage bar implemented into my form. I have a very basic form that uploads the chosen file into a directly on my server.

    Code:
    <form enctype="multipart/form-data" action="http://www.domain.com/upload.php" method="POST"> <input name="uploaded" type="file" /><br> <input type="submit" value="Upload" /> 
    </form>
    ---->

    this is code for upload.php

    --->
    Code:
    <?php $target = "files/"; $target = $target . basename( $_FILES['uploaded']['name']) ; $ok=1; 
    if (!($uploaded_type=="zip")) { echo "You may only upload ZIP files.<br>"; $ok=0; }if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else { echo "Sorry, there was a problem uploading your file."; }
    thanks in advance.

    ?>
    Last edited by gits; Jul 5 '10, 02:45 PM. Reason: moved from insights and added code tags
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    with a file-upload you would need to create a special solution ... since that couldn't be done with an ajax-call - you might have a look here for an example ...

    Comment

    Working...