19 lines
289 B
PHP
19 lines
289 B
PHP
<?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->getWordsRelative($id)) {
|
|
echo json_encode($words);
|
|
} else {
|
|
echo json_encode('No id');
|
|
}
|