dsjoes Posted April 18, 2011 Share Posted April 18, 2011 how would i loop the below script so that more than one file can be uploaded. my form lets you select more than one image but i am not sure how to loop the below. if( isset($_POST['submit']) ) { include('thumbnail.php'); $userfile = $_FILES['uploaded_image']['name']; $file_size = $_FILES['uploaded_image']['size']; $file_temp = $_FILES['uploaded_image']['tmp_name']; $file_err = $_FILES['uploaded_image']['error']; $folder = $_POST['folder']; $path = "../../gallery/gallery_files/gallery/$folder/"; $path1 = "../../gallery/gallery_files/gallery/$folder/thumbnails/"; $image = new SimpleImage(); $image->load($file_temp); $image->resizeToWidth(600); $image->save($path.$userfile); $image->resizeToWidth(110); $image->save($path1.$userfile); } else { } Link to comment https://forums.phpfreaks.com/topic/234100-php-loop/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 18, 2011 Share Posted April 18, 2011 See Example #3 at this link - http://us2.php.net/manual/en/features.file-upload.post-method.php Link to comment https://forums.phpfreaks.com/topic/234100-php-loop/#findComment-1203244 Share on other sites More sharing options...
dsjoes Posted April 19, 2011 Author Share Posted April 19, 2011 thanks got it working Link to comment https://forums.phpfreaks.com/topic/234100-php-loop/#findComment-1203653 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.