首先,将您更改
mysql_escape_string为
mysqli_escape_string
$state = trim(mysqli_escape_string($con, $_POST["state"]));
然后
state用引号引起来
$sql = "SELECt DISTINCT city FROM tbl_zip WHERe state = '".$state ."' ORDER BY city";
同时,把
<script>块出来的
fetch_state.php,只是有它在
index.php与其他
<script>块



