2

I want to use HTML and PHP for 9 or more images upload. The problem is that I don't want 9 upload fields because it looks bad. Does anybody have any suggestions ? Maybe examples ?

Thanks.

Anirvan
  • 6,214
  • 5
  • 39
  • 53
Manny Calavera
  • 6,815
  • 20
  • 60
  • 85

4 Answers4

5

I've been using noSWFUpload for some time and it works pretty good. It relies on XMLHttpRequest's sendAsBinary in supporting clients and falls back to iframe-based submission.

kangax
  • 38,898
  • 13
  • 99
  • 135
1

Connect to the fileInput's onchange event, hide it, get the value and add it to a textarea, and create another. Name them all the same plus an increment: field1, field2... Loop through the field names in PHP and check for existance with isset.

Or use Dojo's FileUploader and force html: http://docs.dojocampus.org/dojox/form/FileUploader

mwilcox
  • 4,065
  • 23
  • 20
0

What I have done in the past is to give an option on doing another upload, or, when they pick the first file, display it as a label, then have another box ready for them to pick another file. Each file input is actually with a unique name, so the server just goes through until it doesn't find the next file.

But, this requires a bit of javascripting. :)

James Black
  • 41,583
  • 10
  • 86
  • 166