simpleWordsCloud/get.php

20 lines
284 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'];
if ($words = $db->getWordsMax($id)) {
echo json_encode($words);
} else {
echo json_encode('No id');
}