jquery - process post data from ajax post with php -
I created a simple Ajax request with jquery ajax to post a string for the php script (php newbie) is.
AJAX:
$ Ajax ({url: "php / server.php", type: "post", data: imgname, contentType: false, processData: wrong, error: function (xhr, textStatus, thrownError) {console.log (thrownError);} , Full: function (jqXHR) {console.log ("yes", jqXHR)}});
PHP
& lt ;? Php $ ajaxData = gettype ($ _ POST ['data']); Echo $ ajaxData; ? & Gt;
Problem:
I get a state 200 OK and in the request header, I can see that my string has been posted. But the information is empty;
notice with notification: Undefined index: C: \ xampp \ htdocs \ webwiese \ dragdropUpload \ php \ fileserver.php in uploadfilename 2If I echo out a simple string "per hand" then it works fine, but I posted ajax to my data How can I "catch" from? THX
You can "hold" your data from the PHP page. You will then return the necessary headings for the AJAX page.
Comments
Post a Comment