ThinkPHP POST is invalid This POST was last edited by bluicez.pdf in 2013-03-1822: 38: 39 according to The POST value to display the page, but it seems that the POST value cannot be obtained: $ username & nbsp; $ this-& gt; $ _ POST [username]; $ name & nbsp; $ this-& gt ThinkPHP POST is invalid
This post was last edited by bluicez.pdf at 22:38:39
The page is displayed based on the value of POST, but the value of POST cannot be obtained:
$ Username = $ this-> $ _ POST ['username'];
// $ Name = $ this-> _ post ('name'); this industry is invalid.
$ User = M ('user ');
$ Data = $ user-> where ('username = "'. $ username.'" ')-> field ('Id, username')-> find ();
If ($ data ){
$ This-> success ('success ');
} Else {
$ This-> error ('failed ');
}
But the _ param method is successful. Please explain it.
Thinkphp? Post php
------ Solution --------------------
Isn't your post parameter username?
$ This-> _ post ('name'); of course it is invalid, $ this-> _ post ('Username'); try again
------ Solution --------------------
Dump ($ _ POST); give it a try