Introduced big DB (~500 000 results) and multiple improvements

This commit is contained in:
Florian SYLVAIN
2021-10-29 15:11:09 +02:00
parent 4cfcf90ffc
commit 0f425bb06a
7 changed files with 71 additions and 28 deletions
+8 -16
View File
@@ -5,29 +5,21 @@
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="app.js"></script>
<link rel="stylesheet" href="stylesheet.css">
<title>Document</title>
</head>
<body>
<?php
include("navbar.php");
if (!isset($_POST['author'])) {
exit();
if (isset($_POST['author'])) {
if (strlen($_POST['author']) < 3) {
echo "<p class='error'>Veuillez entrer 3 caractères minimum.</p>";
} else {
echo "<script>requestToApi('" . $_POST['author'] . "')</script>";
}
}
require_once("class/dump.php");
$author_name = $_POST['author'];
$these_array = dump::getTheseByAuthor($author_name);
$json = json_encode($these_array, JSON_PRETTY_PRINT);
echo '<pre>';
var_dump($json);
echo '</pre>';
?>
<div id="results"></div>
</body>
</html>