26 lines
335 B
PHP
Executable File
26 lines
335 B
PHP
Executable File
<?php
|
|
/**
|
|
* Returns the list of policies.
|
|
*/
|
|
require 'database.php';
|
|
|
|
$output = [];
|
|
$sql = "SELECT * FROM accountant";
|
|
|
|
if($result = mysqli_query($con,$sql))
|
|
{
|
|
$i = 0;
|
|
while($row = mysqli_fetch_assoc($result))
|
|
{
|
|
$output[$i] = $row;
|
|
$i++;
|
|
}
|
|
|
|
echo json_encode($output);
|
|
|
|
}
|
|
else
|
|
{
|
|
http_response_code(404);
|
|
}
|
|
?>
|