 |
|
|
View previous topic :: View next topic |
Author |
Message |
betaFlip
Joined: 15 May 2008 Posts: 1
|
Posted: Thu May 15, 2008 6:20 pm Post subject: Get Form Field Name |
|
|
I am new to PEAR and I am working on a project that has file uploads. The quirk is that for each order you can either have 1 file or 2 files to upload, we also allow for multiple orders at once, so we may have order 1 with 1 file, order 2 with 2 files, order 3 with 1 file, etc.
I have almost everything working except, if order 1 has 1 file and order 2 has 2 files, the first file from order 2 winds up as the second file on order 1, I need a way to determine which orders the files belong to. Heres a bit of the code that I am using
Code: |
$files = array_reverse($upload->getFiles());
$i = -1;
//loop through each file
for($i = 0; $i < $numItems; ++$i)
{
$fileFront = array_pop($files);
$fileBack = array_pop($files);
$fileFront->setValidExtensions($GLOBALS['allowedUploadExtensions'],"allow");
$fileBack->setValidExtensions($GLOBALS['allowedUploadExtensions'],"allow");
...
}
|
Any help would be greatly appreciated. Thanks |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|