13 lines
365 B
PHP
13 lines
365 B
PHP
<?php
|
|
session_start();
|
|
require_once 'config.php';
|
|
header('Content-Type: application/json');
|
|
|
|
if (isset($_SESSION["username"]))
|
|
{
|
|
$conn = dbConn();
|
|
$stmt = $conn->prepare("SELECT People_ID, People_name FROM People");
|
|
$stmt->execute();
|
|
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
echo json_encode(array("message" => "ok", "owners" => $result));
|
|
} |