My code is like this.
In JQ
$ (' #add_user '). Ajaxsubmit ({
url:thinkphp[' MODULE ']+ '/user/add ',
Type: ' POST ',
Success:function (data) {
alert (data);
var top= (screen.height-500)/2;
var left= (screen.width-500)/2;
window.open ("http://localhost/yemian/Admin/Photo?id=" +data+ "", ' 111 ', ' height=620,width=500,top= ' +top+ ', left= ' + Left+ ', Toolbar=no,menubar=no,scrollbars=no, Resizable=no,location=no, Status=no ');
},
});
Newly opened page URL: http://localhost/yemian/admin/photo?id=31
In the newly opened page
echo $id =$_get[' id '];
However, the $_get[' ID ' is not available;
Reply to discussion (solution)
Type: ' POST ',
You specify the post mode, $_get of course not to take
Type: ' POST ',
You're using the Post method,
You should use echo $id =$_post[' id ']; To get
Or put jquery's
Type: ' POST ',
Switch
Type: ' GET ',
Type: ' POST ',
You specify the post mode, $_get of course not to take
Landlord is the first post,post back, then jump to the new page.
The landlord himself checked, whether the value passed past
Success:function (data) {
alert (data);
See what data has.
The first few are misleading, and the get on the URL does not matter with the Ajax post and get.
You have to check the URL of the real access, is not with the parameters passed, if it is, re-check is not handled by the URL rewrite.
Http://localhost/yemian/admin/photo?id=31
That's right.
Then Print_r ($_get);
See what you got.
Http://localhost/yemian/Admin/Photo
Http://localhost/yemian/admin/photo?id=31
Is there a case, these two are the same page? Check that you changed the file?
Oh, I'm going to make a super-low mistake.