Files
better_guestbook/api/settings/appname.php
T

19 lines
472 B
PHP
Executable File

<?php
// Set internal to false so that the answer goes to the client
if (!isset($internal)) {
$internal = false;
define("API_DIR", "../");
}
// Load Main Library
require API_DIR . "api.php";
$api = new gbAPI(false, $internal);
// Get App Name
$command = "SELECT name, value FROM settings WHERE name = :name";
$result = $api->dbCommand($command, true, true, [":name" => "application_name"]);
$api->answer(200, [
"application_name" => $result[0]["value"]
]);