forked from alicheaibx/securityserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcase.php
More file actions
31 lines (23 loc) · 617 Bytes
/
Copy pathcase.php
File metadata and controls
31 lines (23 loc) · 617 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
<?php
$con = mysqli_connect( 'localhost', 'root', 'Shmegevod0', 'security_db2' );
// Check connection
if ( mysqli_connect_errno() )
{
echo 'Failed to connect to MySQL: ' . mysqli_connect_error();
}
$sql = 'SELECT * FROM `case`;';
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 );
?>