-
Notifications
You must be signed in to change notification settings - Fork 0
/
Refreshbuilder.php
32 lines (32 loc) · 1.01 KB
/
Refreshbuilder.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
include("smartyConfig.php");
include("appWideConfig.php");
include("dbConfig.php");
include("builder_function.php");
include("/includes/configs/configs.php");
$ctid = $_REQUEST["ctid"];
$ctName = ViewCityDetails($ctid);
if($ctid != '')
{
$localityArr = Array();
$sql = "SELECT A.ENTITY, A.BUILDER_ID FROM ".RESI_BUILDER." AS A WHERE A.CITY = '" . $ctName['LABEL']."' GROUP BY A.BUILDER_NAME ORDER BY A.ENTITY ASC";
$data = mysql_query($sql);
while ($dataArr = mysql_fetch_array($data))
{
array_push($localityArr, $dataArr);
}
echo "<select name = 'builder' id = 'builder' onchange = 'selectedBuilderValue(this.value);'>";
echo "<option value=''>Select Builder</option>";
foreach($localityArr as $val)
{
echo "<option value=".$val["BUILDER_ID"].">".$val["ENTITY"] . "</option>";
}
echo "</select>";
}
else
{
echo "<select name = 'builder' id = 'builder'>";
echo "<option value=''>Select Builder</option>";
echo "</select>";
}
?>