-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbilling.php
More file actions
30 lines (28 loc) · 710 Bytes
/
Copy pathbilling.php
File metadata and controls
30 lines (28 loc) · 710 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
<?phprequire_once 'conc.php';
if ( !empty( $policeid ) ) {
if ( isset( $_POST['police'] ) ) {
$policeid = $_POST['police'];
}
}
// Check connection
if ( mysqli_connect_errno() )
{
echo 'Failed to connect to MySQL: ' . mysqli_connect_error();
}
if ( !empty( $policeid ) ) {
# code...
$sql = "SELECT * FROM `billing` WHERE `police `=`$policeid`";
}
if ( !empty( $result ) ) {
if ( $result = mysqli_query( $con, $sql ) )
{
$emparray = array();
while( $row = mysqli_fetch_assoc( $result ) )
$emparray[] = $row;
echo( json_encode( $emparray ) );
// Free result set
mysqli_free_result( $result );
}
}
mysqli_close( $con );
?>