dropfaith Posted September 1, 2008 Share Posted September 1, 2008 what i need to do is upload 4 files and a folder of files im building a gallery script and the 4 pics are sample photos then the folder would be the full set of images . i need it so it posts the files to server and where they are so i can later pull them out for this http://dropfaithproductions.com/test/pinup.php then clicking on the sample is going to load a slideshow with a xml playlist of images(which i can handle its just uploading and inserting ill have issues with.. Link to comment https://forums.phpfreaks.com/topic/122204-multiple-file-upload-plus-folder-upload/ Share on other sites More sharing options...
Fadion Posted September 1, 2008 Share Posted September 1, 2008 Is it me or there isn't any question there! If you want advice, ask, otherwise no one will write the code for you. As for the folder select and upload, i dont think it can be done. You can have multiple files upload fields instead. Link to comment https://forums.phpfreaks.com/topic/122204-multiple-file-upload-plus-folder-upload/#findComment-630915 Share on other sites More sharing options...
dropfaith Posted September 1, 2008 Author Share Posted September 1, 2008 my bad what im looking for is basic advice on how to accomplish the upload of 4 files then wondering (as im clueless on this part) how i could upload a entire set of images with a single upload (whether its a folder or a zip file that then get unzipped when it gets to server)not sure whats possible here as its my first attempt at file uploads.. So any advice on the best way to build an image galley http://dropfaithproductions.com/test/add.php is a copy of the form i want to write the code to submit it all.. Link to comment https://forums.phpfreaks.com/topic/122204-multiple-file-upload-plus-folder-upload/#findComment-630924 Share on other sites More sharing options...
Fadion Posted September 1, 2008 Share Posted September 1, 2008 I'm not sure (or not aware) that you can let users specify a folder and grab all it's files. As for the zip, PHP has some archive extensions that will do the work, but I'm not sure if you're willing to go into them. The best way here should be giving the users 4 file upload fields which make up an array like this: <input type="file" name="photos[]"> <input type="file" name="photos[]"> And the php code to grab them: <?php $photos = $_FILES['photos']['name']; //$photos will become an array print_r($photos); //you get all the filenames here if(count($photos) == 4){ //check if all four files are uploaded //the file processing code } else{ echo 'Please upload all the four images'; } ?> Link to comment https://forums.phpfreaks.com/topic/122204-multiple-file-upload-plus-folder-upload/#findComment-630962 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.