function getCity($provinceId) { $sql ="SELECT `cityid`,`cityname` FROM `tblcity` inner join `tblprovince` ON `tblcity`.`pid`='$provinceId' order by `cityid` asc"; $query = mysql_query($sql) or die ("Could not access DB: " . mysql_error()); $row = mysql_fetch_assoc($query); while($row) { $id = $row['cityid']; $name = $row['cityname']; echo " <option value ='$id'>".$name."</option> "; $row = mysql_fetch_assoc($query); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)