here is a snipet of code i am using to test the file upload
Code: Select all
$num_files = count($_FILES['IMG']['name']);
for($x = 0; $x < $num_files; $x++)
{
echo "the files you picked are...<br>";
echo $_FILES['IMG']['name'][$x];
}Code: Select all
<form action="upload.php" method="POST" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="200000" /><br>
File:<input name="IMG" type="file" /> <br>
File:<input name="IMG" type="file" /> <br>
File:<input name="IMG" type="file" /> <br>
File:<input name="IMG" type="file" /> <br>
...
<input type="submit" value="Upload Files" />
<form>For some odd reason, it prints nothing wnen i use the [$x].
any ideas why this happens?