Hi guys,
Im getting insane. I can't get it working. What i want to do is count the amount of files in the post.
I've got 8 file fields.
Pic 1: <input type="file" name="item_file[]">
Pic 2: <input type="file" name="item_file[]">
Pic 3: <input type="file" name="item_file[]">
Pic 4: <input type="file" name="item_file[]">
Pic 5: <input type="file" name="item_file[]">
Pic 6: <input type="file" name="item_file[]">
Pic 7: <input type="file" name="item_file[]">
Pic 8: <input type="file" name="item_file[]">
So if i upload 4 files, the count has to be 4. It always say i've uploaded 8 files...
var_dump(count($_FILES['item_file']['name']) != ''); //returns 8
var_dump(count($_FILES['item_file'])); //returns 8
var_dump(count($_FILES)); //returns 8
Can someone help me...
TNX TT
Im getting insane. I can't get it working. What i want to do is count the amount of files in the post.
I've got 8 file fields.
Pic 1: <input type="file" name="item_file[]">
Pic 2: <input type="file" name="item_file[]">
Pic 3: <input type="file" name="item_file[]">
Pic 4: <input type="file" name="item_file[]">
Pic 5: <input type="file" name="item_file[]">
Pic 6: <input type="file" name="item_file[]">
Pic 7: <input type="file" name="item_file[]">
Pic 8: <input type="file" name="item_file[]">
So if i upload 4 files, the count has to be 4. It always say i've uploaded 8 files...
var_dump(count($_FILES['item_file']['name']) != ''); //returns 8
var_dump(count($_FILES['item_file'])); //returns 8
var_dump(count($_FILES)); //returns 8
Can someone help me...
TNX TT