Просмотр поста

.
blackvj

если не хочешь морочить голову с селектором переменных

то лучше сделай на стационарное количество файлов вот пример:

$handle = new upload($_FILES['imagefile1']);
if ($handle->uploaded) {
код настроек для картинки
$handle->image_convert = 'jpg';
handle->process('../files/pic/');
if ($handle->processed){
echo "<li>Скрин загружен!</li>";}
else {echo display_error($handle->error);}
$handle->clean();
}

$handle = new upload($_FILES['imagefile2']);
if ($handle->uploaded) {
код настроек для картинки
$handle->image_convert = 'jpg';
handle->process('../files/pic/');
if ($handle->processed){
echo "<li>Скрин загружен!</li>";}
else {echo display_error($handle->error);}
$handle->clean();
}

echo 'Скрин:
<input type="file" name="imagefile1" value="" />';
echo '<input type="hidden" name="MAX_FILE_SIZE" value="' . (1024 * $flsz) . '" />';

echo 'Скрин:
<input type="file" name="imagefile2" value="" />';
echo '<input type="hidden" name="MAX_FILE_SIZE" value="' . (1024 * $flsz) . '" />';