<?php
session_start();
$token = uniqid(rand());
$_SESSION["token"] = $token;
$_SESSION['token_time'] = time();
?>

<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Formulaire</title>
    <link rel="stylesheet" href="decoration.css">
</head>
<body>
<div class="hero">

    <div class="form-box">

        <img src="Images/logo.png"
             style="width: 140px ; height: 140px ; margin-top: 20px;margin-left: 30%; position: relative;flex: auto">
        <div id="corps">
            <form id="login" class="input-group" method="post" action="Server/process.php">
                <input id="email" class="input-field" name="email" placeholder="E-mail" type="email"
                       value="Anass@aaa.aa" required />
                <input id="password" class="input-field" name="password" placeholder="Mot de passe" type="password"
                       value="aaa" required />
                <div class="button-box">
                    <button type="button" class="toggle-btn" onclick="resetForm()">Reset</button>
                    <button type="submit" class="toggle-btn" name="etat" value="inscription">Inscription</button>
                    <button type="submit" class="toggle-btn" name="etat" value="connexion">Connexion</button>
                </div>
                <input type="hidden" name="token" id="token" value="<?php echo $token;?>"/>
            </form>


        </div>
    </div>
</div>
<script>
    function resetForm() {
        document.getElementById('email').value = "";
        document.getElementById('password').value = "";
    }
</script>
</body>
</html>
