Backend/20240918_gyak/index.php
2024-09-18 20:24:12 +02:00

36 lines
700 B
PHP

<?php
session_start();
?>
<!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>
<?php
//echo $_POST['name'];
setcookie("suti", "Digi", time() - 86400);
$_SESSION['username'] = "digivagyok";
echo $_SESSION['username'];
if (!isset($_SESSION['username'])){
echo "You are not logged in";
} else {
echo "You are logged in";
}
?>
<form method="POST">
<input type="hidden" name="name" value="Digi">
<button type="submit">PRESS ME!</button>
</form>
<a href="second.php">ASD</a>
</body>
</html>