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