class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
The form is submitted and the images need to be resized & renamed to image_1.JPG => image_5.JPG and need to overwrite the existing 5 images in the destination directory... (which are also named image_1.JPG => image_5.JPG )
The five images are passed from a form as an array to upload.php.
$files = array(); foreach ($_FILES['image'] as $k => $l) { foreach ($l as $i => $v) { if (!array_key_exists($i, $files)) $files[$i] = array(); $files[$i][$k] = $v; } } foreach ($files as $file) { $handle = new Upload($file); if ($handle->uploaded) { $handle->file_new_name_body = 'image'; $handle->file_overwrite = true; $handle->file_auto_rename = false; $handle->file_new_name_ext = 'JPG'; $handle->image_resize = true; $handle->image_x = 280; $handle->image_ratio_y = true; $handle->jpeg_quality = 60; } }The form is submitted and the images need to be resized & renamed to image_1.JPG => image_5.JPG and need to overwrite the existing 5 images in the destination directory... (which are also named image_1.JPG => image_5.JPG )Hope this clarifies what i'm trying to achieve.
Thanks in advance!