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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-06-08 17:30:501027浏览
<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"
;
}
?>

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn