Reputation: 492
I am Using Multiple File Upload Code
if(isset($_FILES['imagaes']))
{
echo count($_FILES['imagaes']);die();
foreach($_FILES['imagaes']['name'] as $key=>$value)
{
if(is_uploaded_file($_FILES['imagaes']['tmp_name'][$key]) && $_FILES['imagaes']['error'][$key] == 0)
{
My code is here--------
}
}
}
it is fit for upload
but when i use it for edit in same file (same html file field)
it gives me error of no name and if i count $_FILES['imagaes']
array it returns 5
even i am not uploaded any file.
can anyone tell me plz..
Upvotes: 1
Views: 27
Reputation: 492
Just remove this line from your code
echo count($_FILES['imagaes']);die();
Your code will work fine
Upvotes: 1