4
1
Fork 0

Krasses xUpdate

This commit is contained in:
Marc Kemper 2017-04-06 17:17:16 +02:00
parent 2b8f19d692
commit 8bbc669c86
2 changed files with 12 additions and 14 deletions

View file

@ -5,17 +5,6 @@
<?php
// session_start();
// if (!isset($_SESSION['id'])){
// echo '<h1>Nicht eingeloggt!</h1>';
// echo '<form action="/login.php" method="post">' .
// 'Username:<input type="text" name="user">' .
// 'Passwort:<input type="password" name="pw">' .
// '<input type="submit" value="Login">' .
// '</form>';
// return;
// }
session_start();
if (!isset($_SESSION['id'])){
echo '<h1>Nicht eingeloggt!</h1>';
@ -29,6 +18,15 @@ if (!isset($_SESSION['id'])){
return;
}
if (isset($_SESSION['id'])){
echo '<h1>Hier klicken zum Ausloggen!</h1>';
echo '<div class="form2">' .
'<form action="/logout.php" method="post">' .
'<input type="submit" value="Logout">' .
'</form>' .
'</div>';
}
$cockDatabase = "dulow";
$host = "localhost";
$user = "root";

View file

@ -1,6 +1,6 @@
<?php
session_start();
session_destroy();
echo "Logout erfolgreich";
?>
header('Location: /');
exit();
?>