Jump to content

php loop


dsjoes

Recommended Posts

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
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.