<?php
    session_start();
    include("func.php");

    if (isSubmit()){
        if(checklogin()){
            echo "sikeres bejelentkezés";
        } else {
            echo "bejelentkezesi hiba";
        }
    }
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Munkamenet</title>
</head>
<body>
    <?php
        if (!isLoggedIn()){
    ?>
<h1>Bejelentkezés</h1>
    <form action="#" method="POST">
        Név: <input type="text" name="loginname"> <br>
        Jelszó: <input type="password" name="pwd"> <br>
        <button type="submit">OK</button>
    </form>
    <?php
        }
    ?>
    
</body>
</html>