Code:
<?php
$username = $_SESSION['MM_Username'];
$times = $_POST['times'];
for ($counter = 1; $counter < $times + 1; $counter++)
{
if ($HTTP_POST_FILES['file$counter']['size'] <= 0)
{
print "<b>File Not Saved</b><BR>";
print "Because your file was over 2 MB, it wasn't recieved.<br>";
}
else
{
$tempFile = $HTTP_POST_FILES['file$counter']['tmp_name'];
$destination = "/****/*******/public_html/photos/$username/" .
$HTTP_POST_FILES['file$counter']['name'];
copy($tempFile, $destination);
print "<b>Your File has been accepted</b><br>";
}
}
?>
$times is the number of times I want the block of code to repeat itself.
'file$counter' has to be in order, such as 1, 2, 3... all the way to the specified number in the $times value.
Now, the loop works fine, however, no matter what it won't upload anything.