General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 27th, 2002, 06:48 AM
stuie stuie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Brisbane, Australia
Posts: 38 stuie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 52 sec
Reputation Power: 7
file input

just a quick query...

does anyone know a way of uploading multiple files, i just cant figure out how they do it, like the hotmail site lets you do when u attach files.

also when i upload a file, does it only exist during the execution of the script that i pass it to? can someone explain teh procedure.. is it php or apache that puts the file in a temp dir or what?

thanks for any comments

???

Last edited by stuie : August 27th, 2002 at 06:50 AM.

Reply With Quote
  #2  
Old August 27th, 2002, 06:52 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
for multiple uploads you can either name each upload field yourself or create an array that prints our each file field, x times, then send all those files as an array, then do a foreach on it and grap the data

Reply With Quote
  #3  
Old August 28th, 2002, 12:16 AM
Lindset Lindset is offline
weirdomoderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Alta, Norway
Posts: 370 Lindset User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to Lindset Send a message via AIM to Lindset
yeah, just set the input name like for example this:

File 1: <input type="file" name="file[]"><br>
File 2: <input type="file" name="file[]"><br>
File 3: <input type="file" name="file[]"><br>

PHP will then create an array like this:

$_POST['file'][0] <- file 1
$_POST['file'][1] <- file 2
$_POST['file'][2] <- file 3

To make it "dynamic", you can use a foreach, like Ben said.

foreach ($_POST['file']) {
do that thang here
}

I have to run to school now
__________________
Best Regards,
Håvard Lindset

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > file input


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway