Yes I know ! read the first message for the problem !! $_FILES is always empty when $_POST is full
On 2 fév, 13:14, jQuery Lover <ilovejqu...@gmail.com> wrote: > Well, it seems you are getting your 'nom' and 'phenom' text fields... > and yes, domb is right, file information data is stored in $_FILES > array... > > ---- > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > On Mon, Feb 2, 2009 at 3:35 PM, phicarre <gam...@bluewin.ch> wrote: > > > No explanation ;-( > > > On 30 jan, 17:10, phicarre <gam...@bluewin.ch> wrote: > >> I replace my code by this one: > >> <? > >> echo "VAR DUMP:<p />"; > >> var_dump($_POST); > >> ?> > > >> and the result is: > > >> VAR DUMP:<p />array(3) { > >> ["nom"]=> > >> string(0) "" > >> ["prenom"]=> > >> string(0) "" > >> ["MAX_FILE_SIZE"]=> > >> string(6) "100000"} > > >> File: 2.gif (6160 bytes)VAR DUMP:<p />array(3) { > >> ["nom"]=> > >> string(0) "" > >> ["prenom"]=> > >> string(0) "" > >> ["MAX_FILE_SIZE"]=> > >> string(6) "100000"} > > >> File: 2.gif (6160 bytes)VAR DUMP:<p />array(3) { > >> ["nom"]=> > >> string(0) "" > >> ["prenom"]=> > >> string(0) "" > >> ["MAX_FILE_SIZE"]=> > >> string(6) "100000"} > > >> File: 2.gif (6160 bytes) > > >> On 30 jan, 01:34, l...@onsight.ie wrote: > > >> > Might just be a typo, but just in case - it should be $_POST > > >> > > What does the error field say? And I'm pretty sure that MAX_FILE_SIZE > >> > > must come immediately before your file input element. > > >> > > Also, are you sure the file is within your upload limit? > > >> > > On Thu, Jan 29, 2009 at 1:01 PM,phicarre<gam...@bluewin.ch> wrote: > > >> > >> jquery.form.js v2.18 > > >> > >> I have a form with a lot of fields and one upload file field: > > >> > >> <form action='' id='form1' enctype='multipart/form-data' style='font- > >> > >> size:85%'> > >> > >> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> > > >> > >> <table > > >> > >> <tr><td>Nom: </td><td><input type='text' size='30' id='nom' > >> > >> name='nom' /></td></tr> > >> > >> <tr><td>Prénom: </td><td><input type="text" size="30" > >> > >> id="prenom" name="prenom" /></td></tr> > >> > >> <tr><td>Photo: </td><td><input type="file" size="40" > >> > >> id="photo" name="photo" /></td></tr> > >> > >> </table> > >> > >> </form> > >> > >> </div> > > >> > >> $('#form1').ajaxSubmit( > >> > >> { > >> > >> type: 'POST', > >> > >> url: 'create.php', > >> > >> beforeSubmit: showRequest , > >> > >> success: function(msg) {}, > >> > >> error: function(requete,iderror) {alert(iderror);} > >> > >> } > >> > >> ); > > >> > >> In create.php, the $_FILES is correct (name,size,type,tmp name,error) > >> > >> BUT the $POST is empty ! > >> > >> Why ?