diff --git a/index.php b/index.php index abbcacd6dbebdd83b2c8af77a2b4cafd44efe2be..e66b398d8f24c40eedb9267e6082c2aeacdcab17 100644 --- a/index.php +++ b/index.php @@ -16,7 +16,7 @@ require_once 'header.php'; ?> </nav> - +<?php var_dump($_SESSION); ?> <div> </div> diff --git a/login_backend.php b/login_backend.php index e55d7b47db153a18e2442ddc3211799f302117bd..7daf254c61161fa48708ceb6e27117ee7437bdae 100644 --- a/login_backend.php +++ b/login_backend.php @@ -16,6 +16,10 @@ if(isset($_POST['login']) && isset($_POST['password']) && !empty($_POST['login'] $_SESSION['id'] = $user->getId(); $_SESSION['type'] = $user->getType(); } + else + { + header('Location: index.php?err=3'); + } } catch(Exception $e) { @@ -28,6 +32,10 @@ if(isset($_POST['login']) && isset($_POST['password']) && !empty($_POST['login'] $_SESSION['id'] = $user->getId(); $_SESSION['type'] = $user->getType(); } + else + { + header('Location: index.php?err=2'); + } } catch(Exception $e){ header('Location: index.php?err=2');