Fix redirect after login

This commit is contained in:
Marcel Schwarz 2020-03-14 19:25:21 +01:00
parent f2619aeb2c
commit a0c8944d09

View File

@ -14,9 +14,10 @@ if( (isset($_POST['loginName'])) && isset($_POST['loginPassword'])){
$object = $result->fetch_object();
$_SESSION['user'] = $object->id;
$_SESSION['username'] = $object->username;
echo "Einloggen erfolgreich <br> Willkommen " . $_SESSION['username'];
//header("refresh:1;");
header('Location: index.php?page=myFriendsBook');
// echo "Einloggen erfolgreich <br> Willkommen " . $_SESSION['username'];
// header("refresh:1;");
// header("location:index.php?page=myFriendsBook");
echo "<script>location.href='index.php?page=myFriendsBook';</script>";
} else {
echo "Einloggen fehlgeschlagen";
}