1,105,395 Community Members

batch files upload

Member Avatar
servis
Junior Poster in Training
82 posts since May 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Have a nice day,

i am working on image gallery, i want to create a php script that allow user to select multiple files from any folder of his computer and then upload it to server, just like flickr or orkut, but i have no idea how it can be done.

please anybody help in this regard.

Thanks

Member Avatar
digital-ether
Nearly a Posting Virtuoso
1,264 posts since Sep 2005
Reputation Points: 399 [?]
Q&As Helped to Solve: 102 [?]
Skill Endorsements: 11 [?]
Team Colleague
 
0
 

Have a nice day,

i am working on image gallery, i want to create a php script that allow user to select multiple files from any folder of his computer and then upload it to server, just like flickr or orkut, but i have no idea how it can be done.

please anybody help in this regard.

Thanks

In order to upload multiple files, you need multiple file upload fields.
The file upload on flickr, orkut would use JavaScript to create the multiple upload files in the upload form.

So as you clicked the "add file" button, JavaScript generated a new <input type="file"> field and appended it to the <form>.

Basically, it is more of a JavaScript question then PHP.

To handle file uploads in PHP see:

http://www.php.net/features.file-upload

If you want upload multiple files and receive them as an Array, then name your files like:

<input type="file" name="files[]" />

see: http://www.php.net/manual/en/faq.html.php#faq.html.arrays

This is also in "Example 3" on the PHP file uploads docs. http://www.php.net/features.file-upload

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article