I don't totally understand what you're trying to do, but here are a few comments that I hope can help you:
- Why are you creating multiple CGI objects? I think you want to create a single object, and read the values from that.
- CGI has an upload() function for uploading files, and the docs offer a recommended idiom.
- You don't need to name your fields different things -- The upload() function can be used in array context (see docs)
- Not all browsers send the entire path of the upload (Netscape, at least my netscape, sends only the filename, no
path) So whatever you are trying to accomplish, they'd break your hash idea..