0

I have created a page to upload a file (single) to my server :

<form action="<?php echo $_SERVER['PHP_SELF'];?>?e_name=<?php echo $_GET['e_name']; ?>" method="post" enctype="multipart/form-data">
<input type="file" id="upload-video" name="userfile" onchange="handleFiles(this.files)" class="input"/>
<div>
<input type="submit" name="submit" value="העלה" class="button"/>
</div>
</form>

and i was wondering how i could add a progress bar to it. i have noticed that in chrome you can see the upload percentage and wanted to know if there is a way to use that information.

if not, what is a good way to do this? i have been looking around but always seem to get confused with what i find, if someone could explain it simply that would be grate.

thank you very much.

Dvir Levy
  • 8,018
  • 11
  • 39
  • 60
  • tried this? [Upload Progress Bar in PHP](http://stackoverflow.com/questions/849237/upload-progress-bar-in-php) – Czechnology Feb 01 '12 at 20:04
  • possible duplicate of [Show progress for PHP long script](http://stackoverflow.com/questions/7049303/show-progress-for-php-long-script) – Madara's Ghost Feb 01 '12 at 20:04

2 Answers2

1

I've been using a jQuery plugin to do all my file uploads, seems quicker than trying to reinvent the wheel. It includes the form plus the progressbar and hints on how to process on the backend. Plus, they've done all the bugchecking for you.

Jquery File Upload Plugin

bpeterson76
  • 12,918
  • 5
  • 49
  • 82
  • im trying to insert this into a joolan system. i was able to insert it where i want but i cant upload or delete. delete does nothing and upload get error "unexpected <" do u know anything about this? – Dvir Levy Feb 01 '12 at 21:39
  • You'd have to show your code. It's possible you haven't terminated your server-side language or properly quoted the script if that's how you chose to use it. An editor like NetBeans could point it out very quickly. – bpeterson76 Feb 01 '12 at 22:51
0

check this example , this do what you want

bizzr3
  • 1,925
  • 4
  • 24
  • 37