Im trying to make a script that uploads images. That is easy, however I am trying to make a script that users a for loop to create each of the file uploading scripts and then a foreach loop to go through each one. A condenced version of the script looks like:
<?php
if (empty($hidden)) {
echo "
<form action=\"$PHP_SELF\" method=\"post\">
";
for ($y = 1; $y <= 10; $y++) echo "<input type=\"file\" name=\"imagefile[]\"><br>";
echo "
<br>
<input type=\"hidden\" name=\"hidden\" value=\"1\">
<input type=\"submit\" value=\"Send\">
</form>
";
} else {
foreach ($imagefile as $j => $k) {
echo "-" . $k['name'] . "<br>";
}
}
?>
Basically I am trying for it now just to echo the name of each file so that I can tell it is working. However every file prints out
[quote]- C[/quote]
How can I get this to echo out the right information?