Kurt111780
Technical User
Hello,
I need to retrieve file names from a form submission but I don't know how many fields are submitted. Each field has a name of file1, file2, file3, etc. I'm trying to do something like this but it’s not working.
Then I have to put the file names into an array. Is there a way to use a variable within $POST or is there a different way to do this?
Thanks,
Kurt
It's only easy when you know how.
I need to retrieve file names from a form submission but I don't know how many fields are submitted. Each field has a name of file1, file2, file3, etc. I'm trying to do something like this but it’s not working.
Code:
$i = 1;
while ($_POST['file' . $i] != "")
{
echo $i;
$i++;
}//end while
Then I have to put the file names into an array. Is there a way to use a variable within $POST or is there a different way to do this?
Thanks,
Kurt
It's only easy when you know how.