Krasses xUpdate
This commit is contained in:
parent
2b8f19d692
commit
8bbc669c86
2 changed files with 12 additions and 14 deletions
20
index.php
20
index.php
|
@ -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";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
session_start();
|
||||
session_destroy();
|
||||
|
||||
echo "Logout erfolgreich";
|
||||
?>
|
||||
header('Location: /');
|
||||
exit();
|
||||
?>
|
||||
|
|
Reference in a new issue