The following files exists in this folder. Click to view.
m03u01.php103 lines UTF-8 Unix (LF) 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
<!doctype html>
<html lang="sv">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Inloggning</title>
<!-- Milligram CSS -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.1/milligram.min.css">
<style>
body {
background: #f5f7fa;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
margin: 0;
}
.login-box {
background: #fff;
width: 100%;
max-width: 420px;
padding: 4rem;
border-radius: 10px;
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
.login-box h1 {
margin-bottom: 2.5rem;
text-align: center;
}
.login-box button {
width: 100%;
margin-top: 1rem;
}
</style>
</head>
<body>
<main class="login-box">
<h1>Logga in</h1>
<form action="m03u01.2.php" method="post">
<label for="username">Användarnamn</label>
<input
type="text"
id="username"
name="username"
placeholder="Ange användarnamn"
required
>
<label for="password">Lösenord</label>
<input
type="password"
id="password"
name="password"
placeholder="Ange lösenord"
autocomplete="current-password"
required
>
<label for="birthdate">Födelsedatum</label>
<input
type="date"
id="birthdate"
name="birthdate"
required
>
<p>Ange ditt kön:</p>
<input type="radio" name="gender" value="female" checked />Kvinna <br> <!--checked är där den blåa pricken börjar alltså förvalda alternativet-->
<input type="radio" name="gender" value="male" />Man <br> <!--Man väljer om man är man eller kvinna-->
<label for="confirm">Godkänn</label>
<input
type="checkbox"
id="confirm"
name="confirm"
>
<button type="submit" id="loginButton" disabled>
Logga in
</button>
</form>
</main>
<script>
const checkbox = document.getElementById("confirm");
const loginButton = document.getElementById("loginButton");
checkbox.addEventListener("change", function() {
loginButton.disabled = !checkbox.checked;
});
</script>
</body>
</html>