When passing parameters through AJAX, PHP cannot obtain the AJAX code as follows: JScriptcodetype: POST, url:... phpa. php? Abc, success: function (data) {alert (data);} The PHP code is as follows: PHPcodeecho $ _ GET [ID]; why does the js file display the 'ABC' dialog box, PHP page AJAX parameters passed, PHP cannot get
The AJAX code is as follows:
JScript code
type:'POST',url:'../php/a.php?ID='+'abc',success: function(data){ alert(data);}
The PHP code is as follows:
PHP code
echo $_GET['ID'];
Why is there nothing on the PHP page when the 'ABC' dialog box is displayed in the js file?
------ Solution --------------------
What is "nothing "? How did you access it. Does the url contain an ID?
------ Solution --------------------
Impossible. Since ajax can be obtained. Php returns a value. /A. php? ID = 33 is this access?
------ Solution --------------------
Ajax.html
HTML code