JustinMs66@hotmail.com Posted September 5, 2006 Share Posted September 5, 2006 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] Quote Link to comment Share on other sites More sharing options...
Gregg Posted September 5, 2006 Share Posted September 5, 2006 [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] Quote Link to comment Share on other sites More sharing options...
Humpty Posted September 5, 2006 Share Posted September 5, 2006 I wouldn't mind seeing / having that code. I thought an upload progress bar wasn't possible with PHP. Quote Link to comment Share on other sites More sharing options...
Gregg Posted September 5, 2006 Share Posted September 5, 2006 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.