how send $_FILES to other function?
<?php
function save(how get $_FILES["img"] ??)
{
//$img = $_FILES["img"]; How get $_FILES["img"] ??
$user_file = $_FILES['img']['name'];
$file_temp = $_FILES['img']['tmp_name'];
$new = "new/";
move_uploaded_file($file_temp, $new .$user_file.'');
echo "<br><b>OK<b>";
}
if(isset($_POST['SEND'])){
save($_FILES["img"]);
}
?>
The actual variable is
$_FILES;$_FILES['img']is a value stored within that array. You can’t pass that value to a function and store it in something named$_FILES['img'], but you wouldn’t really want to. Name it something like$img, and use that: