<?php

/* session_start();

if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $_SESSION["email"] = $_POST['email'];
    $_SESSION["user"] = $_POST['user'];
}

$email = isset($_SESSION["email"]) ? $_SESSION["email"] : "";
$user = isset($_SESSION["user"]) ? $_SESSION["user"] : "";
 */
?>

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Reģistrējies šeit</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="register.css">
    </head>

    <body>

        <div class="mainContainer">
            <a href="../homepage/homepage.php" id="returnHome">Atpakaļ</a>

            <div class="registerContainer">
                <h1>Reģistrācija</h1>


                <div class="formContainer">
                    <form method="post" action="registerform.php">

                        <label for="email">E-pasts</label>
                        <br>
                        <input type="text" id="email" name="email" maxlength="50" value="<?= htmlspecialchars($_POST["email"] ?? "") ?>">

                        <br>

                        <label for="user">Lietotājvārds</label>
                        <br>
                        <input type="text" id="user" name="user" maxlength="16" value="<?= htmlspecialchars($_POST["user"] ?? "") ?>">

                        <br>

                        <label for="password">Parole</label>
                        <br>
                        <input type="password" id="password" name="password" maxlength="40">
                        <br>

                    </div>
                        <input type="submit" value="Reģistrēties">

                
                </form>
                <br>
                
                <a href="../login/login.php">Autorizēties</a>

            </div>
        </div>

    </body>
</html>