After entering the mailbox in the email input box, you can pass the mailbox information to the PHP file through the JS file to determine that database operations are always wrong. If there is no database operation, that's right. I don't know why.
After entering the mailbox in the email input box, you can pass the mailbox information to the PHP file through the JS file to determine that database operations are always wrong. If there is no database operation, that's right. I don't know why.
Reply content:
After entering the mailbox in the email input box, you can pass the mailbox information to the PHP file through the JS file to determine that database operations are always wrong. If there is no database operation, that's right. I don't know why.
1. Use ajaxReturn instead of echo
2. "true" and "false" must be returned in string format"
3. The result returned by ajax isString, You cannot use if to directly determine, but should use = to determine, otherwise it will always be true if (response), so it will always return the existing
======================================
Modify answer
First, you must have a full understanding of the mvc model to use thinkphp correctly.
1. The logic of thinkphp is/controller/method,
Assume that your module name is Index (this should be the case from your project directory)
where($where)->find()){ $this->ajaxReturn(true); }else{ $this->ajaxReturn(false); } }}
Then the post code should be written in this way, and the location should be in the view folder of thinkphp.
$.post("/Login/verify",{loginEmail:loginEmail}, function(response){ ...}
Return results using ajaxReturn
Replace false and true with 'false' and 'true '.
$. Post (url, data, function, 'job ')