I need your help: Problems with forms


(JeanRey) #1

Hi all,

I’m developping a module able to upload some PDFs into a server.
My code works outside PIWIK but not as a PIWIK plugin…

I need your help, please.

Thanking you in advance style_emoticons/<#EMO_DIR#>/wink.gif


(JeanRey) #2

I think the problem comes from the $_FILES variable in the Controller file.


(vipsoft) #3

No. The problem is in your HTML. Change:

     Selectionner le document PDF a envoyer: <input type="file" id="document""><br />

to:

     Selectionner le document PDF a envoyer: <input type="file" id="document" name="document" /><br />

(JeanRey) #4

[quote=vipsoft @ Aug 7 2009, 06:34 PM]No. The problem is in your HTML. Change:

     Selectionner le document PDF a envoyer: <input type="file" id="document""><br />

to:

     Selectionner le document PDF a envoyer: <input type="file" id="document" name="document" /><br />

[/quote]
Thanks Vipsoft but the problem is somewhere else, I always have the same problem… Do you have an idea ?


(vipsoft) #5

The missing name attribute was the main error. I did reorganize your code so that I could decipher what it was doing, but otherwise, the upload worked in my test environment.