-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpandal.php
54 lines (41 loc) · 1.26 KB
/
pandal.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
43
44
45
46
47
48
49
50
51
52
53
54
<?php
include 'dbfr.php';
$cmd=$_POST['cmd'];
if($cmd=='register')
{
$pin=$_POST['pin'];
$START=$pin-5;
$END=$pin+5;
$ql="SELECT * FROM pandal WHERE VERIFY='1' AND (PINCODE BETWEEN $START AND $END) ";
$ar=array();
if($query_run=mysqli_query($con,$ql))
{
//$query_run=mysqli_query($con,$ql);
$count=mysqli_num_rows($query_run);
if($count>0)
{
while($row= mysqli_fetch_assoc($query_run))
{
$res=array();
$res["PANDAL_NAME"]=$row["PANDAL NAME"];
$res["ADDRESS"]=$row["ADDRESS"];
$res["MAP"]=$row["MAP"];
$res["IMAGE"]=$row["IMAGE"];
$res["RATING"]=$row["RATING"];
$res["COMMENT"]=$row["COMMENT"];
array_push($ar, $res);
}
}
else
{
//echo "error in registration 1";
$ar[0]["MAP"]="nothing";
}
}
else
{
$ar[0]["MAP"]="nothing";
}
echo json_encode($ar);
}
?>