-
Notifications
You must be signed in to change notification settings - Fork 0
/
addquickcityprocess.php
42 lines (34 loc) · 1.3 KB
/
addquickcityprocess.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
33
34
35
36
37
38
39
40
41
42
<?php
$accessCity = '';
if( $cityAuth == false )
$accessCity = "No Access";
$smarty->assign("accessCity",$accessCity);
$CityDataArr = City::CityArr();
$smarty->assign("CityDataArr", $CityDataArr);
/***************Query for suburb selected************/
if($_POST['cityId'] != '')
{
$suburbSelect = Array();
$sql = "SELECT A.SUBURB_ID, A.CITY_ID, A.LABEL FROM SUBURB AS A WHERE A.CITY_ID = " . $_POST['cityId'] . " ";
$data = mysql_query($sql, $db);
while ($dataArr = mysql_fetch_array($data))
{
array_push($suburbSelect, $dataArr);
}
$smarty->assign("suburbSelect", $suburbSelect);
/***************end Query for suburb selected************/
/***************Query for Locality selected************/
$localitySelect = Array();
$sql = "SELECT A.LOCALITY_ID, A.SUBURB_ID, A.CITY_ID, A.LABEL FROM LOCALITY AS A WHERE A.CITY_ID = " . $_POST['cityId'];
if ($suburbId != null) {
$sql .= " AND A.SUBURB_ID = " . $suburbId;
}
$data = mysql_query($sql, $db);
while ($dataArr = mysql_fetch_array($data))
{
array_push($localitySelect, $dataArr);
}
}
$smarty->assign("localitySelect", $localitySelect);
/***************end Query for Locality selected************/
?>