From 7bc6e3058c600c716c0d427208b201eecdbd70ca Mon Sep 17 00:00:00 2001 From: filippo.bertilotti <filippobertilotti@gmail.com> Date: Mon, 06 May 2024 11:11:16 +0200 Subject: [PATCH] gestione views utilizzando variabile globale _GET[] (parte 16) --- index.php | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/index.php b/index.php index 5fb466a..98326de 100644 --- a/index.php +++ b/index.php @@ -2,4 +2,12 @@ require "src/controllers/products.php"; $controller = new Products; -$controller->index(); \ No newline at end of file +$action = $_GET["action"]; + + +if($action === "index") { + $controller->index(); +}elseif($action === "show") { + $controller->show(); +} + \ No newline at end of file -- Gitblit v1.8.0