forked from alicheaibx/securityserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotificationpath.php
More file actions
45 lines (36 loc) · 943 Bytes
/
Copy pathnotificationpath.php
File metadata and controls
45 lines (36 loc) · 943 Bytes
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
<?php
require_once 'conc.php';
if( isset($_POST['village']))
{
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
$village=$_POST['village'];
if(empty($village))
{
echo"village is empty";
}
else{
if (!empty($village)) {
# code...
$sql = "SELECT `user`.`id`, `police_village`.`police_id`
FROM `user`
, `police_village`
WHERE `user`.`village` = '$village'AND`police_village`.`village_name`= '$village' ;";
}
}
}
if ( $result = mysqli_query( $con, $sql ) )
{ if (!$result) {
die("query failed");
}
$resultCheck=mysqli_num_rows($result);
$emparray = array();
while( $row = mysqli_fetch_assoc( $result ) )
$emparray[] = $row;
echo( json_encode( $emparray ) );
// Free result set
mysqli_free_result( $result );
}
}
mysqli_close( $con );
?>