simpleWordsCloud/get.php

20 lines
289 B
PHP
Raw Normal View History

2020-11-15 21:51:28 +01:00
<?php
include('db.php');
$db = new DataBase();
if (!$db->isInit()) {
echo 'Error db init';
return;
}
if (!isset($_GET['id'])) {
echo json_encode(false);
}
$id = $_GET['id'];
2020-11-22 15:09:31 +01:00
if ($words = $db->getWordsRelative($id)) {
2020-11-15 21:51:28 +01:00
echo json_encode($words);
} else {
echo json_encode('No id');
}