diff --git a/content/search-results.php b/content/search-results.php index 5287246..fa4871b 100644 --- a/content/search-results.php +++ b/content/search-results.php @@ -12,6 +12,12 @@ echo ""; $projectRoot = "/var/www/html/DI-14-C-ImplementedSearch"; $articleClassPath = $projectRoot . '/model/Article.php'; +require_once $projectRoot . '/model/Article.php'; + +if (session_status() === PHP_SESSION_NONE) { + session_start(); +} + $results = $_SESSION["search_results"] ?? []; $query = $_SESSION["search_query"] ?? ""; $resultCount = count($results);