Shaun wrote:
Hi,
I have a form on my site with many file fields for users to upload files. I
am trying to verify that for each file uploaded it corresponds with the name
of the file field i.e.
File_1.CSV:
File_2.CSV:
However if I loop through the $_FILES array like this:
[snip]
However if I loop through the $_FILES array like this:
foreach( $_FILES as $key => $value ){
echo '$key = '.$key.'';
echo '$value = '.$value.'';
}
$key = File_1_CSV
$value['name'] = File_1.CSV
$key = File_2_CSV
$value['name'] = File_2.CSV
The . is replaced with an underscore in the
Shaun,
That is the documented behaviour for form fields in PHP.
See "Dots in incoming variable names" on the following page:
http://php.net/variables.external
Cheers,
David Grant
Shaun wrote:
> Hi,
>
> I have a form on my site with many file fields for users to upload files. I
> am trying t
Hi,
I have a form on my site with many file fields for users to upload files. I
am trying to verify that for each file uploaded it corresponds with the name
of the file field i.e.
File_1.CSV:
File_2.CSV:
However if I loop through the $_FILES array like this:
foreach( $_FILES
4 matches
Mail list logo