District Selection

This commit is contained in:
Walter Hupfeld
2024-02-21 07:55:02 +01:00
parent b55a7f9bc9
commit 183c570444
9 changed files with 53 additions and 29 deletions

View File

@@ -6,11 +6,18 @@
* E-Mail: info@hupfeld-software.de
* Version: 1.0
* Datum: 18.05.2021
* zuletzt bearbeitet: 21.02.2024
******************************** */
// Starte die Session
session_start();
if (isset($_SESSION['district'])) {
$strDistrict=$_SESSION['district'];
}
else {
$strDistrict="";
}
$dbFilename = "../db/locations.db";
require_once("../config.php");
$boolLogin=true;
@@ -22,7 +29,6 @@ $boolLogin=true;
$result = $db->query($strSQL);
if ($row=$result->fetch(PDO::FETCH_ASSOC)) {
if (password_verify($strPassword,$row['passwordhash'])) {
session_start();
$_SESSION['user']=$strUser;
$_SESSION['csrf_token'] = uniqid('', true);
header ("Location: index.php");
@@ -60,6 +66,9 @@ $boolLogin=true;
<li class="nav-item">
<a class="nav-link" href="../index.php?ref=1">Karte</a>
</li>
<li class="nav-item">
<a class="nav-link" href="../liste.php">Liste</a>
</li>
</ul>
</div>
</nav>
@@ -89,6 +98,7 @@ $boolLogin=true;
<div class="form-group">
<label for="password">Password</label>
<input type="password" name="password" class="form-control" id="password" placeholder="Passwort" required>
<input type="hidden" name="district" value="<?=$strDistrict?>">
</div>
<button type="submit" class="btn btn-primary">Absenden</button>
</form>