diff --git a/web/pages/smart/controller.php b/web/pages/smart/controller.php index 518cbe6..eb5c1ad 100644 --- a/web/pages/smart/controller.php +++ b/web/pages/smart/controller.php @@ -18,7 +18,8 @@ class Smart extends Page { { $db = new SQLite3(ROOT.DS.'../crawler/data.db'); $q = $_REQUEST['q']; - $res = $db->query("SELECT * FROM results WHERE teilnehmer LIKE '$q'"); + $query = "SELECT * FROM results WHERE teilnehmer LIKE '$q'"; + $res = $db->query($query); $results = []; while($row = $res->fetchArray()) { @@ -26,6 +27,7 @@ class Smart extends Page { } $this->set('results', $results); + $this->set('query', $query); $this->set('template', 'search.html.php'); } diff --git a/web/pages/smart/search.html.php b/web/pages/smart/search.html.php index 0f6fc68..e47794f 100644 --- a/web/pages/smart/search.html.php +++ b/web/pages/smart/search.html.php @@ -1,3 +1,5 @@ +
+