1

Before Ajax i used simple form with some text input and files, but in ajax php throws error that files are not defined. https://jsfiddle.net/wkLvh8rj/ here is addtodata.php file

if(isset($_GET['name']) &&
isset($_GET['ad']) &&
isset($_FILES['pic1']) &&
isset($_FILES['pic2']) &&
isset($_FILES['pic3']) &&
!isset($_GET["web"]) &&
!isset($_GET["mob"]) &&
!isset($_FILES["pic"]))
{echo "working";}
else{echo "not working";}

So what i'm doing wrong? or what i'm missing?

speed258
  • 27
  • 1
  • Why are you not using multiple image uploading functionality? https://stackoverflow.com/questions/24895170/multiple-image-upload-php-form-with-one-input – Ashok Gujjar May 31 '17 at 09:21
  • Possible duplicate [jQuery AJAX file upload PHP](https://stackoverflow.com/questions/23980733/jquery-ajax-file-upload-php) – Joe Black May 31 '17 at 09:26
  • Possible duplicate of [Sending multipart/formdata with jQuery.ajax](https://stackoverflow.com/questions/5392344/sending-multipart-formdata-with-jquery-ajax) – Rehmat May 31 '17 at 09:33
  • but in my case what should i do? – speed258 May 31 '17 at 11:46

0 Answers0