added doga

This commit is contained in:
szabomarton
2024-10-24 10:45:16 +02:00
parent 829ee5c982
commit 1c13613074
9 changed files with 185 additions and 0 deletions

29
20241021/index.php Normal file
View File

@@ -0,0 +1,29 @@
<?php
session_start();
if (isset($_POST["logout"]) && $_POST["logout"] == 1){
unset($_SESSION["username"]);
unset($_SESSION["password"]);
session_destroy();
$_POST["logout"] = 0;
} else if (isset($_SESSION["username"]) && isset($_SESSION["password"])){
header("Location: main.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form action="termekek.php" method="POST">
Név: <input type="text" name="username"> <br>
Jelszó: <input type="password" name="password"> <br>
<button type="submit">Bejelentkezés</button>
</form>
</body>
</html>