电脑安全

您当前的位置:主页 > 电脑安全 >

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

来源:[db:来源]标题:   仿宋    编辑:电脑技术全能网 时间:2019-09-20 12:30

原标题:php+ajax无刷新实现省、地、市三级联动二-网络编
   <?$conn=mysql_connect("localhost","root","2328725");mysql_select_db("novel");mysql_query("setnames'utf8'");if($provincecode!=""&&$provincecode!=650000&&$provincecode!=710000&&$provincecode!=810000&&$provincecode!=820000&&$provincecode!=110000&&$provincecode!=120000&&$provincecode!=310000&&$provincecode!=500000){$sql="select*fromcitywhereprovincecode=$provincecode";$result=mysql_query($sql);echo"<selectonchange='queryArea(this.options[this.selectedIndex].value)'>/n";echo"<optionvalue='-1'selected>请抉择都会</option>/n";while($row=mysql_fetch_row($result)){echo"<optionvalue='$row[1]'>$row[2]</option>/n";}echo"</select>/n";}if($citycode!=""){$sql="select*fromareawherecitycode=$citycode";$result=mysql_query($sql);echo"<select>/n";echo"<optionvalue='-1'selected>请抉择县</option>/n";while($row=mysql_fetch_row($result)){echo"<optionvalue='$row[1]'>$row[2]</option>/n";}echo"</select>/n";}?>

上一篇:轻松搞定PHP5+apach2+mysql-网络编程

下一篇:没有了