Still havnt grasped it yet
PHP Code:
$allowed_file_types = array(
'application/rar' => 'rar',
'application/zip' => 'zip');
if ($_POST) {
if(!array_key_exists($_FILES['myfiles']['type'], $allowed_file_types)) {
echo 'The file type is not accepted for upload';
}else{
for ($i=0;$i<$numoffile;$i++) {
if (trim($_FILES['myfiles']['name'][$i])!="") {
$newfile = $file_dir.'/'.$_FILES['myfiles']['name'][$i];
move_uploaded_file($_FILES['myfiles']['tmp_name'][$i], $newfile);
$j++;
}
var_dump($_FILES['myfiles']); contains the data while $myfiles is obviously blank, but still get the file type prompt
Thanks
Bookmarks