FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

upload multiple files

 


AlexandruDan
Hello.

I tryed to add 5 pictures for an announcement.
I know how to add the announcement and 1 picture for it and I don't want to have 5 cases with "add the 1st/2nd/3th/4th/5th picture".

Can somebody help me, please?
AOP Web Development
you can make set an array for the files upload and retrieve the $_FILES['pic']['name'][$key] via foreach.
Code:

//But to make sure just print_r($_FILES);
in order for you to get the files


foreach($_FILES as $key){

echo $_FILES['pic']['name'][$key];

}

Star Wars Fanatic
I think he is talking about the form, he doesn't want five boxes for them to click to choose to upload, he wants something so it is just one box... At least, that's what I took him to mean.

I don't know of anything like that, personally, but you should Google it.
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.