
<?php
$method = "GET";
$islogin = false;
if(isset($_GET["kod"])){
    switch($_GET["kod"]){
        case "1111":
        case "2222":
        case "3333":
        case "4444": $islogin = true;
                    break;

        default:
            $islogin = false;
            break;
    }
}





?>

<!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
        if (!$islogin) {
    ?>
    <form action="" method="<?php echo $method; ?>">
        <input type="text" name="nev">
        <input type="number" name="kod" min="1000" max="9999">
        <input type="submit" value="belepes">
    </form>

    <?php
        }
        else
            echo "<h1>CSAO".$_GET["nev"]."</h1>";
            echo  "<a href='/PHP_digivagyok/20240912/index.php'>Kijelentkezés</a>";
    ?>

</body>
</html>

