<?php
include("functions.php");
$db = new PHP_fun();
$str = "";
$stateid = trim($_REQUEST['stateid']);
if ($stateid != "")
{
$sql = sprintf("SELECT city_id, city_name FROM city WHERE state_id = '%d' ", $stateid);
$rs = $db->select_row($sql);
if (count($rs) > 0)
{
for($i=0;$i<count($rs);$i++)
{
$str .= $rs[$i]['city_id'].":".$rs[$i]['city_name']."###";
}
echo $str = substr($str,0,-3);
}
}
?>
|