Jump to content

Upload Progress Bar??? HELP!!!


Recommended Posts

hey so i have a working PHP code for a upload form, but i wana make a progress bar for it. so like if it's a pretty big file, people will know how much longer it'l take. here is my current code:

[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!";
    }
}
?>[/code]
Link to comment
Share on other sites

[url=http://darkwaterstudio.net/TestUpload/upload.php]PREVIEW YOUR UPLOAD SCRIPT HERE[/url]
I all ready made it,yeah i included a "Ban" function for you.
It allows only the files you want and places in folder securly!

If you want an "Image Loading Bar" just ad it tothe config file.

Mail me for the files here: [url=http://darkwaterstudio.net/datingsite/contactus.php]Mail Me Here[/url]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.