I have summarized some fart experiences
1. After using ajax to post data to the background page, you need to reconnect to the database. Don’t think that it is enough to connect with the previous session
2. In order to deal with the problem of returning garbled characters, I After adding header("Content-Type:text/html;charset=GB2312");, it can be displayed normally. Later, when I checked it in firefox, I was prompted to download this webpage. After searching a lot of information on the Internet, I got a vague understanding. There is a grammatical error in the web page code. For security reasons, Firefox will not display it directly but prompts for download. I rechecked the statement just now and found that I wrote an extra "". After removing it, the problem was solved, haha, so If you encounter such a problem, check the html tag carefully. After all, Firefox is not as smart as IE
3. Finally, as a web site developer, you must be responsible. Don’t think that everything will be fine if you pass the test in IE. After all, not everyone uses IE, and you have to do more tests in other browsers to show your professionalism
ajax script: