upload fail with two form data


Anyone has got this problem ?
I put 2 formdata, for insert new and update with different form. If i disable or comment on formdata, the uploader works. But if I use both formdata, the uploader doesn’t work.
Here I attach the demo, kindly help me to fix my code :frowning: .
Load file upload_works.php or upload_not_work.php then klik new to upload a file.

upload.rar (1.88 MB)


browser have FormData() function

in “uploader_works.php” line with FormData override is commented (line 166)
/*FormData= […

in “uploader_not_work.php” it not commented, html5 mode used FormData() for generating forms and sending them on server. just rename FormData to formData or give it any other name

Hi Andrei,

I never know about that, thank you so much.
All of my form with uploader are working now :smiley:
Thanks dhx