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 { } Quote 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 Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/234100-php-loop/#findComment-1203653 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.