View sourcecode

The following files exists in this folder. Click to view.

m03u01.php

103 lines UTF-8 Unix (LF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!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>