I have a question about SQL injection. The website processes a message board and sends it to the PHP controller through ajax for processing $. ajax ({url: 'http: // www. ************? Content = '+ & nbsp; thisContent & nbsp; + & nbsp;' & amp; use SQL injection
I have a question: the website processes a message board and sends it to the PHP controller through ajax for processing.
$. Ajax ({
Url: 'http: // www .************? Content = '+ thisContent +' & username = '+ thisUsername +' & phone = '+ thisPhone +' & callback =? ',
Type: 'GET ',
DataType: 'jsonp ',
Success: function (d ){
If (d. code = 200 ){
}
}
});
PHP uses GET to access data and directly transmits the data to the MYSql database after receiving the data. but the problem is that the smart user directly enters http: // www in the browser address bar. ************? Content = '+ thisContent +' & username = '+ thisUsername +' & phone = '+ thisPhone +' & callback =? In this way, you can also insert data into the database.
If someone uses the software to continuously transmit data to you through a browser, your MYSql is definitely not affected. It will definitely collapse. Do masters have any good solutions ??? Please answer! Share: More
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service