Ajax achieves second-level interaction with php and ajaxphp
The examples in this article share with you the specific code for implementing second-level interaction using Ajax combined with php. ajax is used to obtain data from php. The specific content is as follows:
Use ajax to retrieve data from php
<! DOCTYPE html>
Php:
<? Php // data used to process the second-level Association of client requests // 1. receive province information sent by the client $ province =$ _ POST ['propcince ']; // 2. determine the current province information and provide different city information switch ($ province) {case 'shandong province ': echo 'qingdao, Jinan, Weihai, Rizhao, Dezhou'; break; case 'liaoning province ': echo 'shenyang city, Dalian city, Tieling City, Dandong City, Jinzhou City'; break; case 'Jilin province ': echo 'changchun city, Songyuan City, Jilin City, Tonghua City, Siping City '; break;} // is the response string from the server?>
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.