From 527308b201ef31bf919290891ab17bc9f3db7827 Mon Sep 17 00:00:00 2001 From: Walter Hupfeld Date: Tue, 20 Feb 2024 16:06:57 +0100 Subject: [PATCH] session cookie --- index.php | 23 +++++++++++++---------- liste.php | 19 ++++++++++++------- start.php | 9 +++++++-- 3 files changed, 32 insertions(+), 19 deletions(-) diff --git a/index.php b/index.php index c5d0412..de18e05 100644 --- a/index.php +++ b/index.php @@ -13,15 +13,18 @@ header("Location: setup.php"); } */ +// Starte die Session + session_start(); + if (isset($_GET['d'])) { + $strDistrict=$_GET['d']; + $_SESSION['district'] = $_GET['d']; + } else if (isset($_SESSION['district'])) { + $strDistrict=$_SESSION['district']; + } + else { + header("Location: start.php"); + } - if (isset($_GET['d'])) { - $strDistrict=$_GET['d']; - } else { - header("Location: start.php"); - } - - - require("config.db.php"); require("config.php"); require_once("lib/functions.php"); @@ -103,10 +106,10 @@