PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Get Form Field Name

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PEAR Forum Forum Index -> General PEAR questions
View previous topic :: View next topic  
Author Message
betaFlip



Joined: 15 May 2008
Posts: 1

PostPosted: Thu May 15, 2008 6:20 pm    Post subject: Get Form Field Name Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PEAR Forum Forum Index -> General PEAR questions All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement