Home >php教程 >PHP源码 >php+ajax无刷新实现省、地、市三级联动二

php+ajax无刷新实现省、地、市三级联动二

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-08 17:30:501027browse
<script>ec(2);</script>


$conn
=mysql_connect("localhost","root","2328725"
);
mysql_select_db("novel"
);
mysql_query("set names 'utf8'"
);
if(
$provincecode!=""&&$provincecode!=650000&&$provincecode!=710000&&$provincecode!=810000&&$provincecode!=820000&&$provincecode!=110000&&$provincecode!=120000&&$provincecode!=310000&&$provincecode!=500000
){
  
$sql="select * from city where provincecode=$provincecode"
;
  
$result=mysql_query($sql
);
  echo 
"
;
  echo 
"\n"
;
  while(
$row=mysql_fetch_row($result
)){
   echo 
"\n"
;
  }
  echo 
"\n"
;
}

if(
$citycode!=""
){
  
$sql="select * from area where citycode=$citycode"
;
  
$result=mysql_query($sql
);
  echo 
"
;
  echo 
"\n"
;
  while(
$row=mysql_fetch_row($result
)){
   echo 
"\n"
;
  }
  echo 
"\n"
;
}
?>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:PHP的FTP学习(二)Next article:PHP图片上传代码 2