I am working on an admin area that will have file uploads on several pages. Regardless of the name of the form field I want to do some specific processes, but I’m a bit stuck on how to do this in a function. I have the code below, which I knew going in wouldn’t be correct, but I’m not sure how to achieve what I’m trying to do.
function fileprocessor ($file)
{
echo $_FILES['$file']['tmp_name'];
}
Any thoughts?
$_FILES is the process of a form submit. to pass it to a function you need to pass the field name through the function.
In the Code you will have
This way you can have what ever you may like in the file processor
EDIT
You can test my version here http://jawilliams.site11.com/filestest.php