Jump to content

Archived

This topic is now archived and is closed to further replies.

JustinMs66@hotmail.com

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]

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites
I wouldn't mind seeing / having that code.  I thought an upload progress bar wasn't possible with PHP.

Share this post


Link to post
Share on other sites
It wouldent be just in php,
Just the call function in the php "On Submit" then it would load the "Progress Bar" then close on file completion!

Share this post


Link to post
Share on other sites

×

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.