Welcome Guest, Not a member yet? Register   Sign In
How to show file upload names and size?
#5

<?php
$files = array();
$count_files = count($_FILES["userfile"]["name"]);
if($count_files!=0){
for($i=0;$i < $count_files;$i++){
$files[$i]["name"] = $_FILES["userfile"]["name"][$i];
$files[$i]["type"] = $_FILES["userfile"]["type"][$i];
$files[$i]["tmp_name"] = $_FILES["userfile"]["tmp_name"][$i];
$files[$i]["error"] = $_FILES["userfile"]["error"][$i];
$files[$i]["size"] = $_FILES["userfile"]["size"][$i];
}
}

print_r($files);
?>



Use this code in form submit page for get all files in single array
Reply


Messages In This Thread
RE: How to show file upload names and size? - by mp.inviable - 06-15-2016, 06:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB